PLplot
5.10.0
|
00001 // PlplotCanvas - a GnomeCanvas widget for use with plplot's gcw driver 00002 // 00003 // Copyright (C) 2004, 2005 Thomas J. Duck 00004 // All rights reserved. 00005 // 00006 // Thomas J. Duck <tom.duck@dal.ca> 00007 // Department of Physics and Atmospheric Science, 00008 // Dalhousie University, Halifax, Nova Scotia, Canada, B3H 3J5 00009 // 00010 // 00011 // NOTICE 00012 // 00013 // This library is free software; you can redistribute it and/or 00014 // modify it under the terms of the GNU Lesser General Public 00015 // License as published by the Free Software Foundation; either 00016 // version 2.1 of the License, or (at your option) any later version. 00017 // 00018 // This library is distributed in the hope that it will be useful, 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00021 // Lesser General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU Lesser General Public 00024 // License along with this library; if not, write to the Free Software 00025 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 00026 // USA 00027 // 00028 00029 #ifndef __PLPLOTCANVAS_H__ 00030 #define __PLPLOTCANVAS_H__ 00031 00032 #include "plplot.h" 00033 #include "gcw.h" 00034 00035 #include <glib-object.h> 00036 #include <libgnomecanvas/libgnomecanvas.h> 00037 00038 00039 G_BEGIN_DECLS 00040 00041 #define PLPLOT_TYPE_CANVAS plplot_canvas_get_type() 00042 00043 #define PLPLOT_CANVAS( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( ( obj ), PLPLOT_TYPE_CANVAS, PlplotCanvas ) ) 00044 00045 #define PLPLOT_CANVAS_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( ( klass ), PLPLOT_TYPE_CANVAS, PlplotCanvasClass ) ) 00046 00047 #define PLPLOT_IS_CANVAS( obj ) ( G_TYPE_CHECK_INSTANCE_TYPE( ( obj ), PLPLOT_TYPE_CANVAS ) ) 00048 00049 #define PLPLOT_IS_CANVAS_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE( ( klass ), PLPLOT_TYPE_CANVAS ) ) 00050 00051 #define PLPLOT_CANVAS_GET_CLASS( o ) ( G_TYPE_INSTANCE_GET_CLASS( ( o ), PLPLOT_TYPE_CANVAS, PlplotCanvasClass ) ) 00052 00053 typedef struct _PlplotCanvas PlplotCanvas; 00054 typedef struct _PlplotCanvasClass PlplotCanvasClass; 00055 00056 00057 struct _PlplotCanvas 00058 { 00059 GnomeCanvas parent; 00060 00061 gint Nstream; // The stream number 00062 }; 00063 00064 struct _PlplotCanvasClass 00065 { 00066 GnomeCanvasClass parent; 00067 }; 00068 00069 PLDLLIMPEXP_GNOME2 GType plplot_canvas_get_type(); 00070 00071 PLDLLIMPEXP_GNOME2 PlplotCanvas* plplot_canvas_new(); 00072 PLDLLIMPEXP_GNOME2 void plplot_canvas_devinit( PlplotCanvas* self ); 00073 PLDLLIMPEXP_GNOME2 void plplot_canvas_dispose( PlplotCanvas *self ); 00074 00075 PLDLLIMPEXP_GNOME2 gint plplot_canvas_get_stream_number( PlplotCanvas* self ); 00076 PLDLLIMPEXP_GNOME2 void plplot_canvas_set_size( PlplotCanvas* self, gint width, gint height ); 00077 PLDLLIMPEXP_GNOME2 void plplot_canvas_set_zoom( PlplotCanvas* self, gdouble magnification ); 00078 PLDLLIMPEXP_GNOME2 void plplot_canvas_use_text( PlplotCanvas* self, gboolean use_text ); 00079 PLDLLIMPEXP_GNOME2 void plplot_canvas_use_pixmap( PlplotCanvas* self, gboolean use_pixmap ); 00080 PLDLLIMPEXP_GNOME2 void plplot_canvas_use_persistence( PlplotCanvas* self, gboolean use_persistence ); 00081 00082 00083 //-------------------------------------------------------------------------- 00084 // Plplot wrappers - last updated 29 January 2005 00085 // 00086 // This should be kept up-to-date with plplot.h 00087 // 00088 // 00089 //-------------------------------------------------------------------------- 00090 00091 00092 // set the format of the contour labels 00093 00094 PLDLLIMPEXP_GNOME2 void plplot_canvas_setcontlabelformat( PlplotCanvas* self, PLINT lexp, PLINT sigdig ); 00095 00096 // set offset and spacing of contour labels 00097 00098 PLDLLIMPEXP_GNOME2 void plplot_canvas_setcontlabelparam( PlplotCanvas* self, PLFLT offset, PLFLT size, PLFLT spacing, PLINT active ); 00099 00100 // Advance to subpage "page", or to the next one if "page" = 0. 00101 00102 PLDLLIMPEXP_GNOME2 void plplot_canvas_adv( PlplotCanvas* self, PLINT page ); 00103 00104 // simple arrow plotter. 00105 00106 PLDLLIMPEXP_GNOME2 void plplot_canvas_arrows( PlplotCanvas* self, PLFLT *u, PLFLT *v, PLFLT *x, PLFLT *y, PLINT n, PLFLT scale, PLFLT dx, PLFLT dy ); 00107 00108 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 ); 00109 00110 PLDLLIMPEXP_GNOME2 void plplot_canvas_svect( PlplotCanvas* self, PLFLT *arrowx, PLFLT *arrowy, PLINT npts, PLINT fill ); 00111 00112 // This functions similarly to plbox() except that the origin of the axes 00113 // is placed at the user-specified point (x0, y0). 00114 00115 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 ); 00116 00117 // Plot a histogram using x to store data values and y to store frequencies 00118 00119 PLDLLIMPEXP_GNOME2 void plplot_canvas_bin( PlplotCanvas* self, PLINT nbin, PLFLT *x, PLFLT *y, PLINT center ); 00120 00121 // Start new page. Should only be used with pleop(). 00122 00123 PLDLLIMPEXP_GNOME2 void plplot_canvas_bop( PlplotCanvas* self ); 00124 00125 // This draws a box around the current viewport. 00126 00127 PLDLLIMPEXP_GNOME2 void plplot_canvas_box( PlplotCanvas* self, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub ); 00128 00129 // This is the 3-d analogue of plbox(). 00130 00131 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 ); 00132 00133 // Calculate world coordinates and subpage from relative device coordinates. 00134 00135 PLDLLIMPEXP_GNOME2 void plplot_canvas_calc_world( PlplotCanvas* self, PLFLT rx, PLFLT ry, PLFLT *wx, PLFLT *wy, PLINT *window ); 00136 00137 // Clear current subpage. 00138 00139 PLDLLIMPEXP_GNOME2 void plplot_canvas_clear( PlplotCanvas* self ); 00140 00141 // Set color, map 0. Argument is integer between 0 and 15. 00142 00143 PLDLLIMPEXP_GNOME2 void plplot_canvas_col0( PlplotCanvas* self, PLINT icol0 ); 00144 00145 // Set color, map 1. Argument is a float between 0. and 1. 00146 00147 PLDLLIMPEXP_GNOME2 void plplot_canvas_col1( PlplotCanvas* self, PLFLT col1 ); 00148 00149 // Draws a contour plot from data in f(nx,ny). Is just a front-end to 00150 // plfcont, with a particular choice for f2eval and f2eval_data. 00151 // 00152 00153 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 ); 00154 00155 // Draws a contour plot using the function evaluator f2eval and data stored 00156 // by way of the f2eval_data pointer. This allows arbitrary organizations 00157 // of 2d array data to be used. 00158 // 00159 00160 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 ); 00161 00162 // Copies state parameters from the reference stream to the current stream. 00163 00164 // PLDLLIMPEXP_GNOME2 void plplot_canvas_cpstrm(PlplotCanvas* self, PLINT iplsr, PLINT flags); 00165 00166 // Converts input values from relative device coordinates to relative plot 00167 // coordinates. 00168 00169 PLDLLIMPEXP_GNOME2 void plplot_canvas_did2pc( PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax ); 00170 00171 // Converts input values from relative plot coordinates to relative 00172 // device coordinates. 00173 00174 PLDLLIMPEXP_GNOME2 void plplot_canvas_dip2dc( PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax ); 00175 00176 // End a plotting session for all open streams. 00177 00178 // PLDLLIMPEXP_GNOME2 void plplot_canvas_plend(PlplotCanvas* self); 00179 00180 // End a plotting session for the current stream only. 00181 00182 // PLDLLIMPEXP_GNOME2 void plplot_canvas_plend1(PlplotCanvas* self); 00183 00184 // Simple interface for defining viewport and window. 00185 00186 // PLDLLIMPEXP_GNOME2 void plplot_canvas_plenv(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis); 00187 00188 // similar to plenv() above, but in multiplot mode does not advance the subpage, 00189 // instead the current subpage is cleared 00190 00191 // PLDLLIMPEXP_GNOME2 void plplot_canvas_plenv0(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis); 00192 00193 // End current page. Should only be used with plbop(). 00194 00195 PLDLLIMPEXP_GNOME2 void plplot_canvas_eop( PlplotCanvas* self ); 00196 00197 // Plot horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i)) 00198 00199 PLDLLIMPEXP_GNOME2 void plplot_canvas_errx( PlplotCanvas* self, PLINT n, PLFLT *xmin, PLFLT *xmax, PLFLT *y ); 00200 00201 // Plot vertical error bars (x,ymin(i)) to (x(i),ymax(i)) 00202 00203 PLDLLIMPEXP_GNOME2 void plplot_canvas_erry( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *ymin, PLFLT *ymax ); 00204 00205 // Advance to the next family file on the next new page 00206 00207 // PLDLLIMPEXP_GNOME2 void plplot_canvas_famadv(PlplotCanvas* self); 00208 00209 // Pattern fills the polygon bounded by the input points. 00210 00211 PLDLLIMPEXP_GNOME2 void plplot_canvas_fill( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y ); 00212 00213 // Pattern fills the 3d polygon bounded by the input points. 00214 00215 PLDLLIMPEXP_GNOME2 void plplot_canvas_fill3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z ); 00216 00217 // Flushes the output stream. Use sparingly, if at all. 00218 00219 // PLDLLIMPEXP_GNOME2 void plplot_canvas_flush(PlplotCanvas* self); 00220 00221 // Sets the global font flag to 'ifont'. 00222 00223 PLDLLIMPEXP_GNOME2 void plplot_canvas_font( PlplotCanvas* self, PLINT ifont ); 00224 00225 // Load specified font set. 00226 00227 PLDLLIMPEXP_GNOME2 void plplot_canvas_fontld( PlplotCanvas* self, PLINT fnt ); 00228 00229 // Get character default height and current (scaled) height 00230 00231 PLDLLIMPEXP_GNOME2 void plplot_canvas_gchr( PlplotCanvas* self, PLFLT *p_def, PLFLT *p_ht ); 00232 00233 // Returns 8 bit RGB values for given color from color map 0 00234 00235 PLDLLIMPEXP_GNOME2 void plplot_canvas_gcol0( PlplotCanvas* self, PLINT icol0, PLINT *r, PLINT *g, PLINT *b ); 00236 00237 // Returns the background color by 8 bit RGB value 00238 00239 PLDLLIMPEXP_GNOME2 void plplot_canvas_gcolbg( PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b ); 00240 00241 // Returns the current compression setting 00242 00243 PLDLLIMPEXP_GNOME2 void plplot_canvas_gcompression( PlplotCanvas* self, PLINT *compression ); 00244 00245 // Get the current device (keyword) name 00246 00247 PLDLLIMPEXP_GNOME2 void plplot_canvas_gdev( PlplotCanvas* self, char *p_dev ); 00248 00249 // Retrieve current window into device space 00250 00251 PLDLLIMPEXP_GNOME2 void plplot_canvas_gdidev( PlplotCanvas* self, PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy ); 00252 00253 // Get plot orientation 00254 00255 PLDLLIMPEXP_GNOME2 void plplot_canvas_gdiori( PlplotCanvas* self, PLFLT *p_rot ); 00256 00257 // Retrieve current window into plot space 00258 00259 PLDLLIMPEXP_GNOME2 void plplot_canvas_gdiplt( PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax ); 00260 00261 // Get FCI (font characterization integer) 00262 00263 PLDLLIMPEXP_GNOME2 void plplot_canvas_gfci( PlplotCanvas* self, PLUNICODE *pfci ); 00264 00265 // Get family file parameters 00266 00267 // PLDLLIMPEXP_GNOME2 void plplot_canvas_gfam(PlplotCanvas* self, PLINT *p_fam, PLINT *p_num, PLINT *p_bmax); 00268 00269 // Get the (current) output file name. Must be preallocated to >80 bytes 00270 00271 PLDLLIMPEXP_GNOME2 void plplot_canvas_gfnam( PlplotCanvas* self, char *fnam ); 00272 00273 // Get the (current) run level. 00274 00275 PLDLLIMPEXP_GNOME2 void plplot_canvas_glevel( PlplotCanvas* self, PLINT *p_level ); 00276 00277 // Get output device parameters. 00278 00279 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 ); 00280 00281 // Switches to graphics screen. 00282 00283 // PLDLLIMPEXP_GNOME2 void plplot_canvas_gra(PlplotCanvas* self); 00284 00285 // grid irregularly sampled data 00286 00287 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 ); 00288 00289 // Get subpage boundaries in absolute coordinates 00290 00291 PLDLLIMPEXP_GNOME2 void plplot_canvas_gspa( PlplotCanvas* self, PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax ); 00292 00293 // Get current stream number. 00294 00295 // PLDLLIMPEXP_GNOME2 void plplot_canvas_gstrm(PlplotCanvas* self, PLINT *p_strm); 00296 00297 // Get the current library version number 00298 00299 PLDLLIMPEXP_GNOME2 void plplot_canvas_gver( PlplotCanvas* self, char *p_ver ); 00300 00301 // Get viewport boundaries in normalized device coordinates 00302 00303 PLDLLIMPEXP_GNOME2 void plplot_canvas_gvpd( PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax ); 00304 00305 // Get viewport boundaries in world coordinates 00306 00307 PLDLLIMPEXP_GNOME2 void plplot_canvas_gvpw( PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax ); 00308 00309 // Get x axis labeling parameters 00310 00311 PLDLLIMPEXP_GNOME2 void plplot_canvas_gxax( PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits ); 00312 00313 // Get y axis labeling parameters 00314 00315 PLDLLIMPEXP_GNOME2 void plplot_canvas_gyax( PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits ); 00316 00317 // Get z axis labeling parameters 00318 00319 PLDLLIMPEXP_GNOME2 void plplot_canvas_gzax( PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits ); 00320 00321 // Draws a histogram of n values of a variable in array data[0..n-1] 00322 00323 PLDLLIMPEXP_GNOME2 void plplot_canvas_hist( PlplotCanvas* self, PLINT n, PLFLT *data, PLFLT datmin, PLFLT datmax, PLINT nbin, PLINT oldwin ); 00324 00325 // Set current color (map 0) by hue, lightness, and saturation. 00326 00327 PLDLLIMPEXP_GNOME2 void plplot_canvas_hls( PlplotCanvas* self, PLFLT h, PLFLT l, PLFLT s ); 00328 00329 // Initializes PLplot, using preset or default options 00330 00331 // PLDLLIMPEXP_GNOME2 void plplot_canvas_plinit(PlplotCanvas* self); 00332 00333 // Draws a line segment from (x1, y1) to (x2, y2). 00334 00335 PLDLLIMPEXP_GNOME2 void plplot_canvas_join( PlplotCanvas* self, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 ); 00336 00337 // Simple routine for labelling graphs. 00338 00339 PLDLLIMPEXP_GNOME2 void plplot_canvas_lab( PlplotCanvas* self, const char *xlabel, const char *ylabel, const char *tlabel ); 00340 00341 // Sets position of the light source 00342 00343 PLDLLIMPEXP_GNOME2 void plplot_canvas_lightsource( PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT z ); 00344 00345 // Draws line segments connecting a series of points. 00346 00347 PLDLLIMPEXP_GNOME2 void plplot_canvas_line( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y ); 00348 00349 // Draws a line in 3 space. 00350 00351 PLDLLIMPEXP_GNOME2 void plplot_canvas_line3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z ); 00352 00353 // Set line style. 00354 00355 PLDLLIMPEXP_GNOME2 void plplot_canvas_lsty( PlplotCanvas* self, PLINT lin ); 00356 00357 // plot continental outline in world coordinates 00358 00359 PLDLLIMPEXP_GNOME2 void plplot_canvas_map( PlplotCanvas* self, void ( *mapform )( PLINT, PLFLT *, PLFLT * ), char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ); 00360 00361 // Plot the latitudes and longitudes on the background. 00362 00363 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 ); 00364 00365 // Plots a mesh representation of the function z[x][y]. 00366 00367 PLDLLIMPEXP_GNOME2 void plplot_canvas_mesh( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt ); 00368 00369 // Plots a mesh representation of the function z[x][y] with contour 00370 00371 PLDLLIMPEXP_GNOME2 void plplot_canvas_meshc( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel ); 00372 00373 // Creates a new stream and makes it the default. 00374 00375 // PLDLLIMPEXP_GNOME2 void plplot_canvas_mkstrm(PlplotCanvas* self, PLINT *p_strm); 00376 00377 // Prints out "text" at specified position relative to viewport 00378 00379 PLDLLIMPEXP_GNOME2 void plplot_canvas_mtex( PlplotCanvas* self, const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text ); 00380 00381 // Plots a 3-d representation of the function z[x][y]. 00382 00383 PLDLLIMPEXP_GNOME2 void plplot_canvas_plot3d( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLINT side ); 00384 00385 // Plots a 3-d representation of the function z[x][y] with contour. 00386 00387 PLDLLIMPEXP_GNOME2 void plplot_canvas_plot3dc( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel ); 00388 00389 // Plots a 3-d representation of the function z[x][y] with contour and 00390 // y index limits. 00391 00392 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 ); 00393 00394 // Set fill pattern directly. 00395 00396 PLDLLIMPEXP_GNOME2 void plplot_canvas_pat( PlplotCanvas* self, PLINT nlin, PLINT *inc, PLINT *del ); 00397 00398 // Plots array y against x for n points using ASCII code "code". 00399 00400 PLDLLIMPEXP_GNOME2 void plplot_canvas_poin( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code ); 00401 00402 // Draws a series of points in 3 space. 00403 00404 PLDLLIMPEXP_GNOME2 void plplot_canvas_poin3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT code ); 00405 00406 // Draws a polygon in 3 space. 00407 00408 PLDLLIMPEXP_GNOME2 void plplot_canvas_poly3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *draw, PLINT ifcc ); 00409 00410 // Set the floating point precision (in number of places) in numeric labels. 00411 00412 PLDLLIMPEXP_GNOME2 void plplot_canvas_prec( PlplotCanvas* self, PLINT setp, PLINT prec ); 00413 00414 // Set fill pattern, using one of the predefined patterns. 00415 00416 PLDLLIMPEXP_GNOME2 void plplot_canvas_psty( PlplotCanvas* self, PLINT patt ); 00417 00418 // Prints out "text" at world cooordinate (x,y). 00419 00420 PLDLLIMPEXP_GNOME2 void plplot_canvas_ptex( PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, const char *text ); 00421 00422 // Replays contents of plot buffer to current device/file. 00423 00424 PLDLLIMPEXP_GNOME2 void plplot_canvas_replot( PlplotCanvas* self ); 00425 00426 // Set line color by red, green, blue from 0. to 1. 00427 00428 PLDLLIMPEXP_GNOME2 void plplot_canvas_rgb( PlplotCanvas* self, PLFLT r, PLFLT g, PLFLT b ); 00429 00430 // Set line color by 8 bit RGB values. 00431 00432 PLDLLIMPEXP_GNOME2 void plplot_canvas_rgb1( PlplotCanvas* self, PLINT r, PLINT g, PLINT b ); 00433 00434 // Set character height. 00435 00436 PLDLLIMPEXP_GNOME2 void plplot_canvas_schr( PlplotCanvas* self, PLFLT def, PLFLT scale ); 00437 00438 // Set color map 0 colors by 8 bit RGB values 00439 00440 PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap0( PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol0 ); 00441 00442 // Set number of colors in cmap 0 00443 00444 PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap0n( PlplotCanvas* self, PLINT ncol0 ); 00445 00446 // Set color map 1 colors by 8 bit RGB values 00447 00448 PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1( PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol1 ); 00449 00450 // Set color map 1 colors using a piece-wise linear relationship between 00451 // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. 00452 00453 PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1l( PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *alt_hue_path ); 00454 00455 // Set number of colors in cmap 1 00456 00457 PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1n( PlplotCanvas* self, PLINT ncol1 ); 00458 00459 // Set a given color from color map 0 by 8 bit RGB value 00460 00461 PLDLLIMPEXP_GNOME2 void plplot_canvas_scol0( PlplotCanvas* self, PLINT icol0, PLINT r, PLINT g, PLINT b ); 00462 00463 // Set the background color by 8 bit RGB value 00464 00465 PLDLLIMPEXP_GNOME2 void plplot_canvas_scolbg( PlplotCanvas* self, PLINT r, PLINT g, PLINT b ); 00466 00467 // Used to globally turn color output on/off 00468 00469 PLDLLIMPEXP_GNOME2 void plplot_canvas_scolor( PlplotCanvas* self, PLINT color ); 00470 00471 // Set the compression level 00472 00473 PLDLLIMPEXP_GNOME2 void plplot_canvas_scompression( PlplotCanvas* self, PLINT compression ); 00474 00475 // Set the device (keyword) name 00476 00477 // PLDLLIMPEXP_GNOME2 void plplot_canvas_sdev(PlplotCanvas* self, const char *devname); 00478 00479 // Set window into device space using margin, aspect ratio, and 00480 // justification 00481 00482 PLDLLIMPEXP_GNOME2 void plplot_canvas_sdidev( PlplotCanvas* self, PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy ); 00483 00484 // Set up transformation from metafile coordinates. 00485 00486 PLDLLIMPEXP_GNOME2 void plplot_canvas_sdimap( PlplotCanvas* self, PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax, PLFLT dimxpmm, PLFLT dimypmm ); 00487 00488 // Set plot orientation, specifying rotation in units of pi/2. 00489 00490 PLDLLIMPEXP_GNOME2 void plplot_canvas_sdiori( PlplotCanvas* self, PLFLT rot ); 00491 00492 // Set window into plot space 00493 00494 PLDLLIMPEXP_GNOME2 void plplot_canvas_sdiplt( PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax ); 00495 00496 // Set window into plot space incrementally (zoom) 00497 00498 PLDLLIMPEXP_GNOME2 void plplot_canvas_sdiplz( PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax ); 00499 00500 // Set the escape character for text strings. 00501 00502 PLDLLIMPEXP_GNOME2 void plplot_canvas_sesc( PlplotCanvas* self, char esc ); 00503 00504 // Set family file parameters 00505 00506 // PLDLLIMPEXP_GNOME2 void plplot_canvas_sfam(PlplotCanvas* self, PLINT fam, PLINT num, PLINT bmax); 00507 00508 // Set FCI (font characterization integer) 00509 00510 PLDLLIMPEXP_GNOME2 void plplot_canvas_sfci( PlplotCanvas* self, PLUNICODE fci ); 00511 00512 // Set the output file name. 00513 00514 PLDLLIMPEXP_GNOME2 void plplot_canvas_sfnam( PlplotCanvas* self, const char *fnam ); 00515 00516 // Shade region. 00517 00518 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 ); 00519 00520 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 ); 00521 00522 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 ); 00523 00524 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 ); 00525 00526 // Set up lengths of major tick marks. 00527 00528 PLDLLIMPEXP_GNOME2 void plplot_canvas_smaj( PlplotCanvas* self, PLFLT def, PLFLT scale ); 00529 00530 // Set the memory area to be plotted (with the 'mem' driver) 00531 00532 // PLDLLIMPEXP_GNOME2 void plplot_canvas_smem(PlplotCanvas* self, PLINT maxx, PLINT maxy, void *plotmem); 00533 00534 // Set up lengths of minor tick marks. 00535 00536 PLDLLIMPEXP_GNOME2 void plplot_canvas_smin( PlplotCanvas* self, PLFLT def, PLFLT scale ); 00537 00538 // Set orientation. Must be done before calling plinit. 00539 00540 // PLDLLIMPEXP_GNOME2 void plplot_canvas_sori(PlplotCanvas* self, PLINT ori); 00541 00542 // Set output device parameters. Usually ignored by the driver. 00543 00544 PLDLLIMPEXP_GNOME2 void plplot_canvas_spage( PlplotCanvas* self, PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, PLINT xoff, PLINT yoff ); 00545 00546 // Set the pause (on end-of-page) status 00547 00548 // PLDLLIMPEXP_GNOME2 void plplot_canvas_spause(PlplotCanvas* self, PLINT pause); 00549 00550 // Set stream number. 00551 00552 // PLDLLIMPEXP_GNOME2 void plplot_canvas_sstrm(PlplotCanvas* self, PLINT strm); 00553 00554 // Set the number of subwindows in x and y 00555 00556 PLDLLIMPEXP_GNOME2 void plplot_canvas_ssub( PlplotCanvas* self, PLINT nx, PLINT ny ); 00557 00558 // Set symbol height. 00559 00560 PLDLLIMPEXP_GNOME2 void plplot_canvas_ssym( PlplotCanvas* self, PLFLT def, PLFLT scale ); 00561 00562 // Initialize PLplot, passing in the windows/page settings. 00563 00564 // PLDLLIMPEXP_GNOME2 void plplot_canvas_star(PlplotCanvas* self, PLINT nx, PLINT ny); 00565 00566 // Initialize PLplot, passing the device name and windows/page settings. 00567 00568 // PLDLLIMPEXP_GNOME2 void plplot_canvas_start(PlplotCanvas* self, const char *devname, PLINT nx, PLINT ny); 00569 00570 // Add a point to a stripchart. 00571 00572 // PLDLLIMPEXP_GNOME2 void plplot_canvas_stripa(PlplotCanvas* self, PLINT id, PLINT pen, PLFLT x, PLFLT y); 00573 00574 // Create 1d stripchart 00575 00576 // 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); 00577 00578 // Deletes and releases memory used by a stripchart. 00579 00580 // PLDLLIMPEXP_GNOME2 void plplot_canvas_stripd(PlplotCanvas* self, PLINT id); 00581 00582 // plots a 2d image (or a matrix too large for plshade() ) 00583 00584 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 ); 00585 00586 // Set up a new line style 00587 00588 PLDLLIMPEXP_GNOME2 void plplot_canvas_styl( PlplotCanvas* self, PLINT nms, PLINT *mark, PLINT *space ); 00589 00590 // Plots the 3d surface representation of the function z[x][y]. 00591 00592 PLDLLIMPEXP_GNOME2 void plplot_canvas_surf3d( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel ); 00593 00594 // Plots the 3d surface representation of the function z[x][y] with y 00595 // index limits. 00596 00597 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 ); 00598 00599 // Sets the edges of the viewport to the specified absolute coordinates 00600 00601 PLDLLIMPEXP_GNOME2 void plplot_canvas_svpa( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); 00602 00603 // Set x axis labeling parameters 00604 00605 PLDLLIMPEXP_GNOME2 void plplot_canvas_sxax( PlplotCanvas* self, PLINT digmax, PLINT digits ); 00606 00607 // Set inferior X window 00608 00609 PLDLLIMPEXP_GNOME2 void plplot_canvas_sxwin( PlplotCanvas* self, PLINT window_id ); 00610 00611 // Set y axis labeling parameters 00612 00613 PLDLLIMPEXP_GNOME2 void plplot_canvas_syax( PlplotCanvas* self, PLINT digmax, PLINT digits ); 00614 00615 // Plots array y against x for n points using Hershey symbol "code" 00616 00617 PLDLLIMPEXP_GNOME2 void plplot_canvas_sym( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code ); 00618 00619 // Set z axis labeling parameters 00620 00621 PLDLLIMPEXP_GNOME2 void plplot_canvas_szax( PlplotCanvas* self, PLINT digmax, PLINT digits ); 00622 00623 // Switches to text screen. 00624 00625 PLDLLIMPEXP_GNOME2 void plplot_canvas_text( PlplotCanvas* self ); 00626 00627 // Sets the edges of the viewport with the given aspect ratio, leaving 00628 // room for labels. 00629 00630 PLDLLIMPEXP_GNOME2 void plplot_canvas_vasp( PlplotCanvas* self, PLFLT aspect ); 00631 00632 // Creates the largest viewport of the specified aspect ratio that fits 00633 // within the specified normalized subpage coordinates. 00634 00635 PLDLLIMPEXP_GNOME2 void plplot_canvas_vpas( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect ); 00636 00637 // Creates a viewport with the specified normalized subpage coordinates. 00638 00639 PLDLLIMPEXP_GNOME2 void plplot_canvas_vpor( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); 00640 00641 // Defines a "standard" viewport with seven character heights for 00642 // the left margin and four character heights everywhere else. 00643 00644 PLDLLIMPEXP_GNOME2 void plplot_canvas_vsta( PlplotCanvas* self ); 00645 00646 // Set up a window for three-dimensional plotting. 00647 00648 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 ); 00649 00650 // Set pen width. 00651 00652 PLDLLIMPEXP_GNOME2 void plplot_canvas_wid( PlplotCanvas* self, PLINT width ); 00653 00654 // Set up world coordinates of the viewport boundaries (2d plots). 00655 00656 PLDLLIMPEXP_GNOME2 void plplot_canvas_wind( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); 00657 00658 // set xor mode; mode = 1-enter, 0-leave, status = 0 if not interactive device 00659 00660 PLDLLIMPEXP_GNOME2 void plplot_canvas_xormod( PlplotCanvas* self, PLINT mode, PLINT *status ); 00661 00662 00663 G_END_DECLS 00664 00665 #endif // __PLPLOTCANVAS_H__