1
// PlplotCanvas - a GnomeCanvas widget for use with plplot's gcw driver
3
// Copyright (C) 2004, 2005 Thomas J. Duck
4
// All rights reserved.
6
// Thomas J. Duck <tom.duck@dal.ca>
7
// Department of Physics and Atmospheric Science,
8
// Dalhousie University, Halifax, Nova Scotia, Canada, B3H 3J5
13
// This library is free software; you can redistribute it and/or
14
// modify it under the terms of the GNU Lesser General Public
15
// License as published by the Free Software Foundation; either
16
// version 2.1 of the License, or (at your option) any later version.
18
// This library is distributed in the hope that it will be useful,
19
// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
// Lesser General Public License for more details.
23
// You should have received a copy of the GNU Lesser General Public
24
// License along with this library; if not, write to the Free Software
25
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
29
#ifndef __PLPLOTCANVAS_H__
30
#define __PLPLOTCANVAS_H__
35
#include <glib-object.h>
36
#include <libgnomecanvas/libgnomecanvas.h>
41
#define PLPLOT_TYPE_CANVAS plplot_canvas_get_type()
43
#define PLPLOT_CANVAS( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( ( obj ), PLPLOT_TYPE_CANVAS, PlplotCanvas ) )
45
#define PLPLOT_CANVAS_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( ( klass ), PLPLOT_TYPE_CANVAS, PlplotCanvasClass ) )
47
#define PLPLOT_IS_CANVAS( obj ) ( G_TYPE_CHECK_INSTANCE_TYPE( ( obj ), PLPLOT_TYPE_CANVAS ) )
49
#define PLPLOT_IS_CANVAS_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE( ( klass ), PLPLOT_TYPE_CANVAS ) )
51
#define PLPLOT_CANVAS_GET_CLASS( o ) ( G_TYPE_INSTANCE_GET_CLASS( ( o ), PLPLOT_TYPE_CANVAS, PlplotCanvasClass ) )
53
typedef struct _PlplotCanvas PlplotCanvas;
54
typedef struct _PlplotCanvasClass PlplotCanvasClass;
61
gint Nstream; // The stream number
64
struct _PlplotCanvasClass
66
GnomeCanvasClass parent;
69
PLDLLIMPEXP_GNOME2 GType plplot_canvas_get_type();
71
PLDLLIMPEXP_GNOME2 PlplotCanvas* plplot_canvas_new();
72
PLDLLIMPEXP_GNOME2 void plplot_canvas_devinit( PlplotCanvas* self );
73
PLDLLIMPEXP_GNOME2 void plplot_canvas_dispose( PlplotCanvas *self );
75
PLDLLIMPEXP_GNOME2 gint plplot_canvas_get_stream_number( PlplotCanvas* self );
76
PLDLLIMPEXP_GNOME2 void plplot_canvas_set_size( PlplotCanvas* self, gint width, gint height );
77
PLDLLIMPEXP_GNOME2 void plplot_canvas_set_zoom( PlplotCanvas* self, gdouble magnification );
78
PLDLLIMPEXP_GNOME2 void plplot_canvas_use_text( PlplotCanvas* self, gboolean use_text );
79
PLDLLIMPEXP_GNOME2 void plplot_canvas_use_pixmap( PlplotCanvas* self, gboolean use_pixmap );
80
PLDLLIMPEXP_GNOME2 void plplot_canvas_use_persistence( PlplotCanvas* self, gboolean use_persistence );
83
//--------------------------------------------------------------------------
84
// Plplot wrappers - last updated 29 January 2005
86
// This should be kept up-to-date with plplot.h
89
//--------------------------------------------------------------------------
92
// set the format of the contour labels
94
PLDLLIMPEXP_GNOME2 void plplot_canvas_setcontlabelformat( PlplotCanvas* self, PLINT lexp, PLINT sigdig );
96
// set offset and spacing of contour labels
98
PLDLLIMPEXP_GNOME2 void plplot_canvas_setcontlabelparam( PlplotCanvas* self, PLFLT offset, PLFLT size, PLFLT spacing, PLINT active );
100
// Advance to subpage "page", or to the next one if "page" = 0.
102
PLDLLIMPEXP_GNOME2 void plplot_canvas_adv( PlplotCanvas* self, PLINT page );
104
// simple arrow plotter.
106
PLDLLIMPEXP_GNOME2 void plplot_canvas_arrows( PlplotCanvas* self, PLFLT *u, PLFLT *v, PLFLT *x, PLFLT *y, PLINT n, PLFLT scale, PLFLT dx, PLFLT dy );
108
PLDLLIMPEXP_GNOME2 void plplot_canvas_vect( PlplotCanvas* self, PLFLT **u, PLFLT **v, PLINT nx, PLINT ny, PLFLT scale, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data );
110
PLDLLIMPEXP_GNOME2 void plplot_canvas_svect( PlplotCanvas* self, PLFLT *arrowx, PLFLT *arrowy, PLINT npts, PLINT fill );
112
// This functions similarly to plbox() except that the origin of the axes
113
// is placed at the user-specified point (x0, y0).
115
PLDLLIMPEXP_GNOME2 void plplot_canvas_axes( PlplotCanvas* self, PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub );
117
// Plot a histogram using x to store data values and y to store frequencies
119
PLDLLIMPEXP_GNOME2 void plplot_canvas_bin( PlplotCanvas* self, PLINT nbin, PLFLT *x, PLFLT *y, PLINT center );
121
// Start new page. Should only be used with pleop().
123
PLDLLIMPEXP_GNOME2 void plplot_canvas_bop( PlplotCanvas* self );
125
// This draws a box around the current viewport.
127
PLDLLIMPEXP_GNOME2 void plplot_canvas_box( PlplotCanvas* self, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub );
129
// This is the 3-d analogue of plbox().
131
PLDLLIMPEXP_GNOME2 void plplot_canvas_box3( PlplotCanvas* self, const char *xopt, const char *xlabel, PLFLT xtick, PLINT nsubx, const char *yopt, const char *ylabel, PLFLT ytick, PLINT nsuby, const char *zopt, const char *zlabel, PLFLT ztick, PLINT nsubz );
133
// Calculate world coordinates and subpage from relative device coordinates.
135
PLDLLIMPEXP_GNOME2 void plplot_canvas_calc_world( PlplotCanvas* self, PLFLT rx, PLFLT ry, PLFLT *wx, PLFLT *wy, PLINT *window );
137
// Clear current subpage.
139
PLDLLIMPEXP_GNOME2 void plplot_canvas_clear( PlplotCanvas* self );
141
// Set color, map 0. Argument is integer between 0 and 15.
143
PLDLLIMPEXP_GNOME2 void plplot_canvas_col0( PlplotCanvas* self, PLINT icol0 );
145
// Set color, map 1. Argument is a float between 0. and 1.
147
PLDLLIMPEXP_GNOME2 void plplot_canvas_col1( PlplotCanvas* self, PLFLT col1 );
149
// Draws a contour plot from data in f(nx,ny). Is just a front-end to
150
// plfcont, with a particular choice for f2eval and f2eval_data.
153
PLDLLIMPEXP_GNOME2 void plplot_canvas_cont( PlplotCanvas* self, PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data );
155
// Draws a contour plot using the function evaluator f2eval and data stored
156
// by way of the f2eval_data pointer. This allows arbitrary organizations
157
// of 2d array data to be used.
160
PLDLLIMPEXP_GNOME2 void plplot_canvas_fcont( PlplotCanvas* self, PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), PLPointer f2eval_data, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data );
162
// Copies state parameters from the reference stream to the current stream.
164
// PLDLLIMPEXP_GNOME2 void plplot_canvas_cpstrm(PlplotCanvas* self, PLINT iplsr, PLINT flags);
166
// Converts input values from relative device coordinates to relative plot
169
PLDLLIMPEXP_GNOME2 void plplot_canvas_did2pc( PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax );
171
// Converts input values from relative plot coordinates to relative
172
// device coordinates.
174
PLDLLIMPEXP_GNOME2 void plplot_canvas_dip2dc( PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax );
176
// End a plotting session for all open streams.
178
// PLDLLIMPEXP_GNOME2 void plplot_canvas_plend(PlplotCanvas* self);
180
// End a plotting session for the current stream only.
182
// PLDLLIMPEXP_GNOME2 void plplot_canvas_plend1(PlplotCanvas* self);
184
// Simple interface for defining viewport and window.
186
// PLDLLIMPEXP_GNOME2 void plplot_canvas_plenv(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis);
188
// similar to plenv() above, but in multiplot mode does not advance the subpage,
189
// instead the current subpage is cleared
191
// PLDLLIMPEXP_GNOME2 void plplot_canvas_plenv0(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis);
193
// End current page. Should only be used with plbop().
195
PLDLLIMPEXP_GNOME2 void plplot_canvas_eop( PlplotCanvas* self );
197
// Plot horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i))
199
PLDLLIMPEXP_GNOME2 void plplot_canvas_errx( PlplotCanvas* self, PLINT n, PLFLT *xmin, PLFLT *xmax, PLFLT *y );
201
// Plot vertical error bars (x,ymin(i)) to (x(i),ymax(i))
203
PLDLLIMPEXP_GNOME2 void plplot_canvas_erry( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *ymin, PLFLT *ymax );
205
// Advance to the next family file on the next new page
207
// PLDLLIMPEXP_GNOME2 void plplot_canvas_famadv(PlplotCanvas* self);
209
// Pattern fills the polygon bounded by the input points.
211
PLDLLIMPEXP_GNOME2 void plplot_canvas_fill( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y );
213
// Pattern fills the 3d polygon bounded by the input points.
215
PLDLLIMPEXP_GNOME2 void plplot_canvas_fill3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z );
217
// Flushes the output stream. Use sparingly, if at all.
219
// PLDLLIMPEXP_GNOME2 void plplot_canvas_flush(PlplotCanvas* self);
221
// Sets the global font flag to 'ifont'.
223
PLDLLIMPEXP_GNOME2 void plplot_canvas_font( PlplotCanvas* self, PLINT ifont );
225
// Load specified font set.
227
PLDLLIMPEXP_GNOME2 void plplot_canvas_fontld( PlplotCanvas* self, PLINT fnt );
229
// Get character default height and current (scaled) height
231
PLDLLIMPEXP_GNOME2 void plplot_canvas_gchr( PlplotCanvas* self, PLFLT *p_def, PLFLT *p_ht );
233
// Returns 8 bit RGB values for given color from color map 0
235
PLDLLIMPEXP_GNOME2 void plplot_canvas_gcol0( PlplotCanvas* self, PLINT icol0, PLINT *r, PLINT *g, PLINT *b );
237
// Returns the background color by 8 bit RGB value
239
PLDLLIMPEXP_GNOME2 void plplot_canvas_gcolbg( PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b );
241
// Returns the current compression setting
243
PLDLLIMPEXP_GNOME2 void plplot_canvas_gcompression( PlplotCanvas* self, PLINT *compression );
245
// Get the current device (keyword) name
247
PLDLLIMPEXP_GNOME2 void plplot_canvas_gdev( PlplotCanvas* self, char *p_dev );
249
// Retrieve current window into device space
251
PLDLLIMPEXP_GNOME2 void plplot_canvas_gdidev( PlplotCanvas* self, PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy );
253
// Get plot orientation
255
PLDLLIMPEXP_GNOME2 void plplot_canvas_gdiori( PlplotCanvas* self, PLFLT *p_rot );
257
// Retrieve current window into plot space
259
PLDLLIMPEXP_GNOME2 void plplot_canvas_gdiplt( PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax );
261
// Get FCI (font characterization integer)
263
PLDLLIMPEXP_GNOME2 void plplot_canvas_gfci( PlplotCanvas* self, PLUNICODE *pfci );
265
// Get family file parameters
267
// PLDLLIMPEXP_GNOME2 void plplot_canvas_gfam(PlplotCanvas* self, PLINT *p_fam, PLINT *p_num, PLINT *p_bmax);
269
// Get the (current) output file name. Must be preallocated to >80 bytes
271
PLDLLIMPEXP_GNOME2 void plplot_canvas_gfnam( PlplotCanvas* self, char *fnam );
273
// Get the (current) run level.
275
PLDLLIMPEXP_GNOME2 void plplot_canvas_glevel( PlplotCanvas* self, PLINT *p_level );
277
// Get output device parameters.
279
PLDLLIMPEXP_GNOME2 void plplot_canvas_gpage( PlplotCanvas* self, PLFLT *p_xp, PLFLT *p_yp, PLINT *p_xleng, PLINT *p_yleng, PLINT *p_xoff, PLINT *p_yoff );
281
// Switches to graphics screen.
283
// PLDLLIMPEXP_GNOME2 void plplot_canvas_gra(PlplotCanvas* self);
285
// grid irregularly sampled data
287
PLDLLIMPEXP_GNOME2 void plplot_canvas_griddata( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT *z, PLINT npts, PLFLT *xg, PLINT nptsx, PLFLT *yg, PLINT nptsy, PLFLT **zg, PLINT type, PLFLT data );
289
// Get subpage boundaries in absolute coordinates
291
PLDLLIMPEXP_GNOME2 void plplot_canvas_gspa( PlplotCanvas* self, PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax );
293
// Get current stream number.
295
// PLDLLIMPEXP_GNOME2 void plplot_canvas_gstrm(PlplotCanvas* self, PLINT *p_strm);
297
// Get the current library version number
299
PLDLLIMPEXP_GNOME2 void plplot_canvas_gver( PlplotCanvas* self, char *p_ver );
301
// Get viewport boundaries in normalized device coordinates
303
PLDLLIMPEXP_GNOME2 void plplot_canvas_gvpd( PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax );
305
// Get viewport boundaries in world coordinates
307
PLDLLIMPEXP_GNOME2 void plplot_canvas_gvpw( PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax );
309
// Get x axis labeling parameters
311
PLDLLIMPEXP_GNOME2 void plplot_canvas_gxax( PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits );
313
// Get y axis labeling parameters
315
PLDLLIMPEXP_GNOME2 void plplot_canvas_gyax( PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits );
317
// Get z axis labeling parameters
319
PLDLLIMPEXP_GNOME2 void plplot_canvas_gzax( PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits );
321
// Draws a histogram of n values of a variable in array data[0..n-1]
323
PLDLLIMPEXP_GNOME2 void plplot_canvas_hist( PlplotCanvas* self, PLINT n, PLFLT *data, PLFLT datmin, PLFLT datmax, PLINT nbin, PLINT oldwin );
325
// Set current color (map 0) by hue, lightness, and saturation.
327
PLDLLIMPEXP_GNOME2 void plplot_canvas_hls( PlplotCanvas* self, PLFLT h, PLFLT l, PLFLT s );
329
// Initializes PLplot, using preset or default options
331
// PLDLLIMPEXP_GNOME2 void plplot_canvas_plinit(PlplotCanvas* self);
333
// Draws a line segment from (x1, y1) to (x2, y2).
335
PLDLLIMPEXP_GNOME2 void plplot_canvas_join( PlplotCanvas* self, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 );
337
// Simple routine for labelling graphs.
339
PLDLLIMPEXP_GNOME2 void plplot_canvas_lab( PlplotCanvas* self, const char *xlabel, const char *ylabel, const char *tlabel );
341
// Sets position of the light source
343
PLDLLIMPEXP_GNOME2 void plplot_canvas_lightsource( PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT z );
345
// Draws line segments connecting a series of points.
347
PLDLLIMPEXP_GNOME2 void plplot_canvas_line( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y );
349
// Draws a line in 3 space.
351
PLDLLIMPEXP_GNOME2 void plplot_canvas_line3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z );
355
PLDLLIMPEXP_GNOME2 void plplot_canvas_lsty( PlplotCanvas* self, PLINT lin );
357
// plot continental outline in world coordinates
359
PLDLLIMPEXP_GNOME2 void plplot_canvas_map( PlplotCanvas* self, void ( *mapform )( PLINT, PLFLT *, PLFLT * ), char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat );
361
// Plot the latitudes and longitudes on the background.
363
PLDLLIMPEXP_GNOME2 void plplot_canvas_meridians( PlplotCanvas* self, void ( *mapform )( PLINT, PLFLT *, PLFLT * ), PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat );
365
// Plots a mesh representation of the function z[x][y].
367
PLDLLIMPEXP_GNOME2 void plplot_canvas_mesh( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt );
369
// Plots a mesh representation of the function z[x][y] with contour
371
PLDLLIMPEXP_GNOME2 void plplot_canvas_meshc( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel );
373
// Creates a new stream and makes it the default.
375
// PLDLLIMPEXP_GNOME2 void plplot_canvas_mkstrm(PlplotCanvas* self, PLINT *p_strm);
377
// Prints out "text" at specified position relative to viewport
379
PLDLLIMPEXP_GNOME2 void plplot_canvas_mtex( PlplotCanvas* self, const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text );
381
// Plots a 3-d representation of the function z[x][y].
383
PLDLLIMPEXP_GNOME2 void plplot_canvas_plot3d( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLINT side );
385
// Plots a 3-d representation of the function z[x][y] with contour.
387
PLDLLIMPEXP_GNOME2 void plplot_canvas_plot3dc( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel );
389
// Plots a 3-d representation of the function z[x][y] with contour and
392
PLDLLIMPEXP_GNOME2 void plplot_canvas_plot3dcl( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, PLINT *indexymin, PLINT*indexymax );
394
// Set fill pattern directly.
396
PLDLLIMPEXP_GNOME2 void plplot_canvas_pat( PlplotCanvas* self, PLINT nlin, PLINT *inc, PLINT *del );
398
// Plots array y against x for n points using ASCII code "code".
400
PLDLLIMPEXP_GNOME2 void plplot_canvas_poin( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code );
402
// Draws a series of points in 3 space.
404
PLDLLIMPEXP_GNOME2 void plplot_canvas_poin3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT code );
406
// Draws a polygon in 3 space.
408
PLDLLIMPEXP_GNOME2 void plplot_canvas_poly3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *draw, PLINT ifcc );
410
// Set the floating point precision (in number of places) in numeric labels.
412
PLDLLIMPEXP_GNOME2 void plplot_canvas_prec( PlplotCanvas* self, PLINT setp, PLINT prec );
414
// Set fill pattern, using one of the predefined patterns.
416
PLDLLIMPEXP_GNOME2 void plplot_canvas_psty( PlplotCanvas* self, PLINT patt );
418
// Prints out "text" at world cooordinate (x,y).
420
PLDLLIMPEXP_GNOME2 void plplot_canvas_ptex( PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, const char *text );
422
// Replays contents of plot buffer to current device/file.
424
PLDLLIMPEXP_GNOME2 void plplot_canvas_replot( PlplotCanvas* self );
426
// Set line color by red, green, blue from 0. to 1.
428
PLDLLIMPEXP_GNOME2 void plplot_canvas_rgb( PlplotCanvas* self, PLFLT r, PLFLT g, PLFLT b );
430
// Set line color by 8 bit RGB values.
432
PLDLLIMPEXP_GNOME2 void plplot_canvas_rgb1( PlplotCanvas* self, PLINT r, PLINT g, PLINT b );
434
// Set character height.
436
PLDLLIMPEXP_GNOME2 void plplot_canvas_schr( PlplotCanvas* self, PLFLT def, PLFLT scale );
438
// Set color map 0 colors by 8 bit RGB values
440
PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap0( PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol0 );
442
// Set number of colors in cmap 0
444
PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap0n( PlplotCanvas* self, PLINT ncol0 );
446
// Set color map 1 colors by 8 bit RGB values
448
PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1( PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol1 );
450
// Set color map 1 colors using a piece-wise linear relationship between
451
// intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
453
PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1l( PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *rev );
455
// Set number of colors in cmap 1
457
PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1n( PlplotCanvas* self, PLINT ncol1 );
459
// Set a given color from color map 0 by 8 bit RGB value
461
PLDLLIMPEXP_GNOME2 void plplot_canvas_scol0( PlplotCanvas* self, PLINT icol0, PLINT r, PLINT g, PLINT b );
463
// Set the background color by 8 bit RGB value
465
PLDLLIMPEXP_GNOME2 void plplot_canvas_scolbg( PlplotCanvas* self, PLINT r, PLINT g, PLINT b );
467
// Used to globally turn color output on/off
469
PLDLLIMPEXP_GNOME2 void plplot_canvas_scolor( PlplotCanvas* self, PLINT color );
471
// Set the compression level
473
PLDLLIMPEXP_GNOME2 void plplot_canvas_scompression( PlplotCanvas* self, PLINT compression );
475
// Set the device (keyword) name
477
// PLDLLIMPEXP_GNOME2 void plplot_canvas_sdev(PlplotCanvas* self, const char *devname);
479
// Set window into device space using margin, aspect ratio, and
482
PLDLLIMPEXP_GNOME2 void plplot_canvas_sdidev( PlplotCanvas* self, PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy );
484
// Set up transformation from metafile coordinates.
486
PLDLLIMPEXP_GNOME2 void plplot_canvas_sdimap( PlplotCanvas* self, PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax, PLFLT dimxpmm, PLFLT dimypmm );
488
// Set plot orientation, specifying rotation in units of pi/2.
490
PLDLLIMPEXP_GNOME2 void plplot_canvas_sdiori( PlplotCanvas* self, PLFLT rot );
492
// Set window into plot space
494
PLDLLIMPEXP_GNOME2 void plplot_canvas_sdiplt( PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax );
496
// Set window into plot space incrementally (zoom)
498
PLDLLIMPEXP_GNOME2 void plplot_canvas_sdiplz( PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax );
500
// Set the escape character for text strings.
502
PLDLLIMPEXP_GNOME2 void plplot_canvas_sesc( PlplotCanvas* self, char esc );
504
// Set family file parameters
506
// PLDLLIMPEXP_GNOME2 void plplot_canvas_sfam(PlplotCanvas* self, PLINT fam, PLINT num, PLINT bmax);
508
// Set FCI (font characterization integer)
510
PLDLLIMPEXP_GNOME2 void plplot_canvas_sfci( PlplotCanvas* self, PLUNICODE fci );
512
// Set the output file name.
514
PLDLLIMPEXP_GNOME2 void plplot_canvas_sfnam( PlplotCanvas* self, const char *fnam );
518
PLDLLIMPEXP_GNOME2 void plplot_canvas_shade( PlplotCanvas* self, PLFLT **a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void ( *fill )( PLINT, PLFLT *, PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data );
520
PLDLLIMPEXP_GNOME2 void plplot_canvas_shade1( PlplotCanvas* self, PLFLT *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void ( *fill )( PLINT, PLFLT *, PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data );
522
PLDLLIMPEXP_GNOME2 void plplot_canvas_shades( PlplotCanvas* self, PLFLT **a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT *clevel, PLINT nlevel, PLINT fill_width, PLINT cont_color, PLINT cont_width, void ( *fill )( PLINT, PLFLT *, PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data );
524
PLDLLIMPEXP_GNOME2 void plplot_canvas_fshade( PlplotCanvas* self, PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), PLPointer f2eval_data, PLFLT ( *c2eval )( PLINT, PLINT, PLPointer ), PLPointer c2eval_data, PLINT nx, PLINT ny, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void ( *fill )( PLINT, PLFLT *, PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data );
526
// Set up lengths of major tick marks.
528
PLDLLIMPEXP_GNOME2 void plplot_canvas_smaj( PlplotCanvas* self, PLFLT def, PLFLT scale );
530
// Set the memory area to be plotted (with the 'mem' driver)
532
// PLDLLIMPEXP_GNOME2 void plplot_canvas_smem(PlplotCanvas* self, PLINT maxx, PLINT maxy, void *plotmem);
534
// Set up lengths of minor tick marks.
536
PLDLLIMPEXP_GNOME2 void plplot_canvas_smin( PlplotCanvas* self, PLFLT def, PLFLT scale );
538
// Set orientation. Must be done before calling plinit.
540
// PLDLLIMPEXP_GNOME2 void plplot_canvas_sori(PlplotCanvas* self, PLINT ori);
542
// Set output device parameters. Usually ignored by the driver.
544
PLDLLIMPEXP_GNOME2 void plplot_canvas_spage( PlplotCanvas* self, PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, PLINT xoff, PLINT yoff );
546
// Set the pause (on end-of-page) status
548
// PLDLLIMPEXP_GNOME2 void plplot_canvas_spause(PlplotCanvas* self, PLINT pause);
550
// Set stream number.
552
// PLDLLIMPEXP_GNOME2 void plplot_canvas_sstrm(PlplotCanvas* self, PLINT strm);
554
// Set the number of subwindows in x and y
556
PLDLLIMPEXP_GNOME2 void plplot_canvas_ssub( PlplotCanvas* self, PLINT nx, PLINT ny );
558
// Set symbol height.
560
PLDLLIMPEXP_GNOME2 void plplot_canvas_ssym( PlplotCanvas* self, PLFLT def, PLFLT scale );
562
// Initialize PLplot, passing in the windows/page settings.
564
// PLDLLIMPEXP_GNOME2 void plplot_canvas_star(PlplotCanvas* self, PLINT nx, PLINT ny);
566
// Initialize PLplot, passing the device name and windows/page settings.
568
// PLDLLIMPEXP_GNOME2 void plplot_canvas_start(PlplotCanvas* self, const char *devname, PLINT nx, PLINT ny);
570
// Add a point to a stripchart.
572
// PLDLLIMPEXP_GNOME2 void plplot_canvas_stripa(PlplotCanvas* self, PLINT id, PLINT pen, PLFLT x, PLFLT y);
574
// Create 1d stripchart
576
// PLDLLIMPEXP_GNOME2 void plplot_canvas_stripc(PlplotCanvas* self, PLINT *id, char *xspec, char *yspec, PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, PLFLT xlpos, PLFLT ylpos, PLINT y_ascl, PLINT acc, PLINT colbox, PLINT collab, PLINT colline[], PLINT styline[], char *legline[], char *labx, char *laby, char *labtop);
578
// Deletes and releases memory used by a stripchart.
580
// PLDLLIMPEXP_GNOME2 void plplot_canvas_stripd(PlplotCanvas* self, PLINT id);
582
// plots a 2d image (or a matrix too large for plshade() )
584
PLDLLIMPEXP_GNOME2 void plplot_canvas_image( PlplotCanvas* self, PLFLT **data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax );
586
// Set up a new line style
588
PLDLLIMPEXP_GNOME2 void plplot_canvas_styl( PlplotCanvas* self, PLINT nms, PLINT *mark, PLINT *space );
590
// Plots the 3d surface representation of the function z[x][y].
592
PLDLLIMPEXP_GNOME2 void plplot_canvas_surf3d( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel );
594
// Plots the 3d surface representation of the function z[x][y] with y
597
PLDLLIMPEXP_GNOME2 void plplot_canvas_surf3dl( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, PLINT *indexymin, PLINT*indexymax );
599
// Sets the edges of the viewport to the specified absolute coordinates
601
PLDLLIMPEXP_GNOME2 void plplot_canvas_svpa( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax );
603
// Set x axis labeling parameters
605
PLDLLIMPEXP_GNOME2 void plplot_canvas_sxax( PlplotCanvas* self, PLINT digmax, PLINT digits );
607
// Set inferior X window
609
PLDLLIMPEXP_GNOME2 void plplot_canvas_sxwin( PlplotCanvas* self, PLINT window_id );
611
// Set y axis labeling parameters
613
PLDLLIMPEXP_GNOME2 void plplot_canvas_syax( PlplotCanvas* self, PLINT digmax, PLINT digits );
615
// Plots array y against x for n points using Hershey symbol "code"
617
PLDLLIMPEXP_GNOME2 void plplot_canvas_sym( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code );
619
// Set z axis labeling parameters
621
PLDLLIMPEXP_GNOME2 void plplot_canvas_szax( PlplotCanvas* self, PLINT digmax, PLINT digits );
623
// Switches to text screen.
625
PLDLLIMPEXP_GNOME2 void plplot_canvas_text( PlplotCanvas* self );
627
// Sets the edges of the viewport with the given aspect ratio, leaving
630
PLDLLIMPEXP_GNOME2 void plplot_canvas_vasp( PlplotCanvas* self, PLFLT aspect );
632
// Creates the largest viewport of the specified aspect ratio that fits
633
// within the specified normalized subpage coordinates.
635
PLDLLIMPEXP_GNOME2 void plplot_canvas_vpas( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect );
637
// Creates a viewport with the specified normalized subpage coordinates.
639
PLDLLIMPEXP_GNOME2 void plplot_canvas_vpor( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax );
641
// Defines a "standard" viewport with seven character heights for
642
// the left margin and four character heights everywhere else.
644
PLDLLIMPEXP_GNOME2 void plplot_canvas_vsta( PlplotCanvas* self );
646
// Set up a window for three-dimensional plotting.
648
PLDLLIMPEXP_GNOME2 void plplot_canvas_w3d( PlplotCanvas* self, PLFLT basex, PLFLT basey, PLFLT height, PLFLT xmin0, PLFLT xmax0, PLFLT ymin0, PLFLT ymax0, PLFLT zmin0, PLFLT zmax0, PLFLT alt, PLFLT az );
652
PLDLLIMPEXP_GNOME2 void plplot_canvas_wid( PlplotCanvas* self, PLINT width );
654
// Set up world coordinates of the viewport boundaries (2d plots).
656
PLDLLIMPEXP_GNOME2 void plplot_canvas_wind( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax );
658
// set xor mode; mode = 1-enter, 0-leave, status = 0 if not interactive device
660
PLDLLIMPEXP_GNOME2 void plplot_canvas_xormod( PlplotCanvas* self, PLINT mode, PLINT *status );
665
#endif // __PLPLOTCANVAS_H__