• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

plplotcanvas.c

Go to the documentation of this file.
00001 // plplotcanvas - a GCW API and associated GnomeCanvas widget
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 // DESCRIPTION
00030 //
00031 // This module provides the PlplotCanvas widget which is derived from
00032 // GnomeCanvas (see
00033 // http://developer.gnome.org/doc/API/2.0/libgnomecanvas/index.html) .
00034 //
00035 //
00036 
00037 #include "plplotcanvas.h"
00038 
00039 
00040 //--------------------------------------------------------------------------
00041 // PlplotCanvas API
00042 
00043 static GObjectClass *parent_class = NULL;
00044 
00045 void plplot_canvas_dispose( PlplotCanvas *self )
00046 {
00047     parent_class->dispose( G_OBJECT( self ) );
00048 }
00049 
00050 static void plplot_canvas_finalize( PlplotCanvas *self )
00051 {
00052     // Flush the plplot buffers and close the stream
00053     plsstrm( self->Nstream ); // Select stream before plplot call
00054     plend1();
00055 
00056     // Call parent's finalize impletmentation
00057     parent_class->finalize( G_OBJECT( self ) );
00058 }
00059 
00060 static void plplot_canvas_init( PlplotCanvas *self )
00061 {
00062     char  text_buffer[1000];
00063     PLINT Nstream;
00064 
00065     plP_getinitdriverlist( text_buffer );
00066     if ( text_buffer[0] != '\0' )
00067     {
00068         plmkstrm( &Nstream );
00069         self->Nstream = (gint) Nstream;
00070     }
00071     else
00072         self->Nstream = 0;
00073 }
00074 
00075 static void plplot_canvas_class_init( PlplotCanvasClass *klass )
00076 {
00077     parent_class = g_type_class_peek( G_TYPE_OBJECT );
00078     GObjectClass* gobject_class = G_OBJECT_CLASS( klass );
00079     gobject_class->dispose  = (void *) plplot_canvas_dispose;
00080     gobject_class->finalize = (void *) plplot_canvas_finalize;
00081 }
00082 
00083 void plplot_canvas_devinit( PlplotCanvas *self )
00084 {
00085     plscol0( 0, 255, 255, 255 ); // Change the plplot background color to white
00086     plscol0( 15, 0, 0, 0 );
00087 
00088     // Use the hack variable to tell the driver to expect a PLESC_DEVINIT
00089     // escape call to finish the driver initialization
00090     //
00091     plsc->hack = 1;
00092 
00093     plsdev( "gcw" );                         // Set the device
00094     plinit();                                // Initialize the device
00095     plP_esc( PLESC_DEVINIT, (void *) self ); // Install into the driver
00096 }
00097 
00098 GType plplot_canvas_get_type()
00099 {
00100     static GType this_type = 0;
00101 
00102     if ( !this_type )
00103     {
00104         static const GTypeInfo this_info = {
00105             sizeof ( PlplotCanvasClass ),
00106             NULL,
00107             NULL,
00108             (GClassInitFunc) plplot_canvas_class_init,
00109             NULL,
00110             NULL,
00111             sizeof ( PlplotCanvas ),
00112             0,
00113             (GInstanceInitFunc) plplot_canvas_init,
00114         };
00115 
00116         this_type = g_type_register_static( GNOME_TYPE_CANVAS, "PlplotCanvas",
00117             &this_info, 0 );
00118     }
00119     return this_type;
00120 }
00121 
00122 PlplotCanvas* plplot_canvas_new()
00123 {
00124     PlplotCanvas *canvas;
00125 
00126     canvas = PLPLOT_CANVAS( g_object_new( PLPLOT_TYPE_CANVAS, "aa", TRUE, NULL ) );
00127 
00128     plplot_canvas_devinit( canvas );
00129 
00130     return canvas;
00131 }
00132 
00133 gint plplot_canvas_get_stream_number( PlplotCanvas* self )
00134 {
00135     return self->Nstream;
00136 }
00137 
00138 void plplot_canvas_set_size( PlplotCanvas* self, gint width, gint height )
00139 {
00140     plsstrm( self->Nstream ); // Select stream before plplot call
00141     gcw_set_canvas_size( GNOME_CANVAS( self ), (PLINT) width, (PLINT) height );
00142 }
00143 
00144 void plplot_canvas_set_zoom( PlplotCanvas* self, gdouble zoom )
00145 {
00146     plsstrm( self->Nstream ); // Select stream before plplot call
00147     gcw_set_canvas_zoom( GNOME_CANVAS( self ), (PLFLT) zoom );
00148 }
00149 
00150 void plplot_canvas_use_text( PlplotCanvas* self, gboolean use_text )
00151 {
00152     plsstrm( self->Nstream ); // Select stream before plplot call
00153     gcw_use_text( (PLINT) use_text );
00154 }
00155 
00156 void plplot_canvas_use_pixmap( PlplotCanvas* self, gboolean use_pixmap )
00157 {
00158     plsstrm( self->Nstream ); // Select stream before plplot call
00159     gcw_use_pixmap( (PLINT) use_pixmap );
00160 }
00161 
00162 void plplot_canvas_use_persistence( PlplotCanvas* self, gboolean use_persistence )
00163 {
00164     plsstrm( self->Nstream ); // Select stream before plplot call
00165     gcw_use_persistence( (PLINT) use_persistence );
00166 }
00167 
00168 
00169 //--------------------------------------------------------------------------
00170 // Plplot wrappers - last updated 29 January 2005
00171 //
00172 //  This should be kept up-to-date with plplot.h
00173 //
00174 //--------------------------------------------------------------------------
00175 
00176 // set the format of the contour labels
00177 
00178 void plplot_canvas_setcontlabelformat( PlplotCanvas* self, PLINT lexp, PLINT sigdig )
00179 {
00180     plsstrm( self->Nstream );
00181     pl_setcontlabelformat( lexp, sigdig );
00182 }
00183 
00184 // set offset and spacing of contour labels
00185 
00186 void plplot_canvas_setcontlabelparam( PlplotCanvas* self, PLFLT offset, PLFLT size, PLFLT spacing, PLINT active )
00187 {
00188     plsstrm( self->Nstream );
00189     pl_setcontlabelparam( offset, size, spacing, active );
00190 }
00191 
00192 // Advance to subpage "page", or to the next one if "page" = 0.
00193 
00194 void plplot_canvas_adv( PlplotCanvas* self, PLINT page )
00195 {
00196     plsstrm( self->Nstream );
00197     pladv( page );
00198 }
00199 
00200 // simple arrow plotter.
00201 
00202 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 )
00203 {
00204     plsstrm( self->Nstream );
00205     plvect( u, v, nx, ny, scale, pltr, pltr_data );
00206 }
00207 
00208 void plplot_canvas_svect( PlplotCanvas* self, PLFLT *arrowx, PLFLT *arrowy, PLINT npts, PLINT fill )
00209 {
00210     plsstrm( self->Nstream );
00211     plsvect( arrowx, arrowy, npts, fill );
00212 }
00213 
00214 // This functions similarly to plbox() except that the origin of the axes
00215 // is placed at the user-specified point (x0, y0).
00216 
00217 void plplot_canvas_axes( PlplotCanvas* self, PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub )
00218 {
00219     plsstrm( self->Nstream );
00220     plaxes( x0, y0, xopt, xtick, nxsub, yopt, ytick, nysub );
00221 }
00222 
00223 // Plot a histogram using x to store data values and y to store frequencies
00224 
00225 void plplot_canvas_bin( PlplotCanvas* self, PLINT nbin, PLFLT *x, PLFLT *y, PLINT center )
00226 {
00227     plsstrm( self->Nstream );
00228     plbin( nbin, x, y, center );
00229 }
00230 
00231 // Start new page.  Should only be used with pleop().
00232 
00233 void plplot_canvas_bop( PlplotCanvas* self )
00234 {
00235     plsstrm( self->Nstream );
00236     plbop();
00237 }
00238 
00239 // This draws a box around the current viewport.
00240 
00241 void plplot_canvas_box( PlplotCanvas* self, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub )
00242 {
00243     plsstrm( self->Nstream );
00244     plbox( xopt, xtick, nxsub, yopt, ytick, nysub );
00245 }
00246 
00247 // This is the 3-d analogue of plbox().
00248 
00249 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 )
00250 {
00251     plsstrm( self->Nstream );
00252     plbox3( xopt, xlabel, xtick, nsubx, yopt, ylabel, ytick, nsuby, zopt, zlabel, ztick, nsubz );
00253 }
00254 
00255 // Calculate world coordinates and subpage from relative device coordinates.
00256 
00257 void plplot_canvas_calc_world( PlplotCanvas* self, PLFLT rx, PLFLT ry, PLFLT *wx, PLFLT *wy, PLINT *window )
00258 {
00259     plsstrm( self->Nstream );
00260     plcalc_world( rx, ry, wx, wy, window );
00261 }
00262 
00263 // Clear current subpage.
00264 
00265 void plplot_canvas_clear( PlplotCanvas* self )
00266 {
00267     plsstrm( self->Nstream );
00268     plclear();
00269 }
00270 
00271 // Set color, map 0.  Argument is integer between 0 and 15.
00272 
00273 void plplot_canvas_col0( PlplotCanvas* self, PLINT icol0 )
00274 {
00275     plsstrm( self->Nstream );
00276     plcol0( icol0 );
00277 }
00278 
00279 // Set color, map 1.  Argument is a float between 0. and 1.
00280 
00281 void plplot_canvas_col1( PlplotCanvas* self, PLFLT col1 )
00282 {
00283     plsstrm( self->Nstream );
00284     plcol1( col1 );
00285 }
00286 
00287 // Draws a contour plot from data in f(nx,ny).  Is just a front-end to
00288 // plfcont, with a particular choice for f2eval and f2eval_data.
00289 //
00290 
00291 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 )
00292 {
00293     plsstrm( self->Nstream );
00294     plcont( f, nx, ny, kx, lx, ky, ly, clevel, nlevel, pltr, pltr_data );
00295 }
00296 
00297 // Draws a contour plot using the function evaluator f2eval and data stored
00298 // by way of the f2eval_data pointer.  This allows arbitrary organizations
00299 // of 2d array data to be used.
00300 //
00301 
00302 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 )
00303 {
00304     plsstrm( self->Nstream );
00305     plfcont( f2eval, f2eval_data, nx, ny, kx, lx, ky, ly, clevel, nlevel, pltr, pltr_data );
00306 }
00307 
00308 // /\* Copies state parameters from the reference stream to the current stream. *\/
00309 
00310 // void plplot_canvas_cpstrm(PlplotCanvas* self, PLINT iplsr, PLINT flags) {
00311 //   plsstrm(self->Nstream);
00312 //   plcpstrm(iplsr, flags);
00313 // }
00314 
00315 // Converts input values from relative device coordinates to relative plot
00316 // coordinates.
00317 
00318 void plplot_canvas_did2pc( PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax )
00319 {
00320     plsstrm( self->Nstream );
00321     pldid2pc( xmin, ymin, xmax, ymax );
00322 }
00323 
00324 // Converts input values from relative plot coordinates to relative
00325 // device coordinates.
00326 
00327 void plplot_canvas_dip2dc( PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax )
00328 {
00329     plsstrm( self->Nstream );
00330     pldip2dc( xmin, ymin, xmax, ymax );
00331 }
00332 
00333 // /\* End a plotting session for all open streams. *\/
00334 
00335 // void plplot_canvas_end(PlplotCanvas* self) {
00336 //   plsstrm(self->Nstream);
00337 //   plend();
00338 // }
00339 
00340 // /\* End a plotting session for the current stream only. *\/
00341 
00342 // void plplot_canvas_end1(PlplotCanvas* self) {
00343 //   plsstrm(self->Nstream);
00344 //   plend1();
00345 // }
00346 
00347 // /\* Simple interface for defining viewport and window. *\/
00348 
00349 // void plplot_canvas_env(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis) {
00350 //   plsstrm(self->Nstream);
00351 //   plenv(xmin, xmax, ymin, ymax, just, axis);
00352 // }
00353 
00354 // /\* similar to plenv() above, but in multiplot mode does not advance the subpage,
00355 //  instead the current subpage is cleared *\/
00356 
00357 // void plplot_canvas_env0(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis) {
00358 //   plsstrm(self->Nstream);
00359 //   plenv0(xmin, xmax, ymin, ymax, just, axis);
00360 // }
00361 
00362 // End current page.  Should only be used with plbop().
00363 
00364 void plplot_canvas_eop( PlplotCanvas* self )
00365 {
00366     plsstrm( self->Nstream );
00367     pleop();
00368 }
00369 
00370 // Plot horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i))
00371 
00372 void plplot_canvas_errx( PlplotCanvas* self, PLINT n, PLFLT *xmin, PLFLT *xmax, PLFLT *y )
00373 {
00374     plsstrm( self->Nstream );
00375     plerrx( n, xmin, xmax, y );
00376 }
00377 
00378 // Plot vertical error bars (x,ymin(i)) to (x(i),ymax(i))
00379 
00380 void plplot_canvas_erry( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *ymin, PLFLT *ymax )
00381 {
00382     plsstrm( self->Nstream );
00383     plerry( n, x, ymin, ymax );
00384 }
00385 
00386 // /\* Advance to the next family file on the next new page *\/
00387 
00388 // void plplot_canvas_famadv(PlplotCanvas* self) {
00389 //   plsstrm(self->Nstream);
00390 //   plfamadv();
00391 // }
00392 
00393 // Pattern fills the polygon bounded by the input points.
00394 
00395 void plplot_canvas_fill( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y )
00396 {
00397     plsstrm( self->Nstream );
00398     plfill( n, x, y );
00399 }
00400 
00401 // Pattern fills the 3d polygon bounded by the input points.
00402 
00403 void plplot_canvas_fill3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z )
00404 {
00405     plsstrm( self->Nstream );
00406     plfill3( n, x, y, z );
00407 }
00408 
00409 // /\* Flushes the output stream.  Use sparingly, if at all. *\/
00410 
00411 // void plplot_canvas_flush(PlplotCanvas* self) {
00412 //   plsstrm(self->Nstream);
00413 //   plflush();
00414 // }
00415 
00416 // Sets the global font flag to 'ifont'.
00417 
00418 void plplot_canvas_font( PlplotCanvas* self, PLINT ifont )
00419 {
00420     plsstrm( self->Nstream );
00421     plfont( ifont );
00422 }
00423 
00424 // Load specified font set.
00425 
00426 void plplot_canvas_fontld( PlplotCanvas* self, PLINT fnt )
00427 {
00428     plsstrm( self->Nstream );
00429     plfontld( fnt );
00430 }
00431 
00432 // Get character default height and current (scaled) height
00433 
00434 void plplot_canvas_gchr( PlplotCanvas* self, PLFLT *p_def, PLFLT *p_ht )
00435 {
00436     plsstrm( self->Nstream );
00437     plgchr( p_def, p_ht );
00438 }
00439 
00440 // Returns 8 bit RGB values for given color from color map 0
00441 
00442 void plplot_canvas_gcol0( PlplotCanvas* self, PLINT icol0, PLINT *r, PLINT *g, PLINT *b )
00443 {
00444     plsstrm( self->Nstream );
00445     plgcol0( icol0, r, g, b );
00446 }
00447 
00448 // Returns the background color by 8 bit RGB value
00449 
00450 void plplot_canvas_gcolbg( PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b )
00451 {
00452     plsstrm( self->Nstream );
00453     plgcolbg( r, g, b );
00454 }
00455 
00456 // Returns the current compression setting
00457 
00458 void plplot_canvas_gcompression( PlplotCanvas* self, PLINT *compression )
00459 {
00460     plsstrm( self->Nstream );
00461     plgcompression( compression );
00462 }
00463 
00464 // Get the current device (keyword) name
00465 
00466 void plplot_canvas_gdev( PlplotCanvas* self, char *p_dev )
00467 {
00468     plsstrm( self->Nstream );
00469     plgdev( p_dev );
00470 }
00471 
00472 // Retrieve current window into device space
00473 
00474 void plplot_canvas_gdidev( PlplotCanvas* self, PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy )
00475 {
00476     plsstrm( self->Nstream );
00477     plgdidev( p_mar, p_aspect, p_jx, p_jy );
00478 }
00479 
00480 // Get plot orientation
00481 
00482 void plplot_canvas_gdiori( PlplotCanvas* self, PLFLT *p_rot )
00483 {
00484     plsstrm( self->Nstream );
00485     plgdiori( p_rot );
00486 }
00487 
00488 // Retrieve current window into plot space
00489 
00490 void plplot_canvas_gdiplt( PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax )
00491 {
00492     plsstrm( self->Nstream );
00493     plgdiplt( p_xmin, p_ymin, p_xmax, p_ymax );
00494 }
00495 
00496 // Get FCI (font characterization integer)
00497 
00498 void plplot_canvas_gfci( PlplotCanvas* self, PLUNICODE *pfci )
00499 {
00500     plsstrm( self->Nstream );
00501     plgfci( pfci );
00502 }
00503 
00504 // /\* Get family file parameters *\/
00505 
00506 // void plplot_canvas_gfam(PlplotCanvas* self, PLINT *p_fam, PLINT *p_num, PLINT *p_bmax) {
00507 //   plsstrm(self->Nstream);
00508 //   plgfam(p_fam, p_num, p_bmax);
00509 // }
00510 
00511 // Get the (current) output file name.  Must be preallocated to >80 bytes
00512 
00513 void plplot_canvas_gfnam( PlplotCanvas* self, char *fnam )
00514 {
00515     plsstrm( self->Nstream );
00516     plgfnam( fnam );
00517 }
00518 
00519 // Get the (current) run level.
00520 
00521 void plplot_canvas_glevel( PlplotCanvas* self, PLINT *p_level )
00522 {
00523     plsstrm( self->Nstream );
00524     plglevel( p_level );
00525 }
00526 
00527 // Get output device parameters.
00528 
00529 void plplot_canvas_gpage( PlplotCanvas* self, PLFLT *p_xp, PLFLT *p_yp, PLINT *p_xleng, PLINT *p_yleng, PLINT *p_xoff, PLINT *p_yoff )
00530 {
00531     plsstrm( self->Nstream );
00532     plgpage( p_xp, p_yp, p_xleng, p_yleng, p_xoff, p_yoff );
00533 }
00534 
00535 // /\* Switches to graphics screen. *\/
00536 
00537 // void plplot_canvas_gra(PlplotCanvas* self) {
00538 //   plsstrm(self->Nstream);
00539 //   plgra();
00540 // }
00541 
00542 // grid irregularly sampled data
00543 
00544 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 )
00545 {
00546     plsstrm( self->Nstream );
00547     plgriddata( x, y, z, npts, xg, nptsx, yg, nptsy, zg, type, data );
00548 }
00549 
00550 // Get subpage boundaries in absolute coordinates
00551 
00552 void plplot_canvas_gspa( PlplotCanvas* self, PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax )
00553 {
00554     plsstrm( self->Nstream );
00555     plgspa( xmin, xmax, ymin, ymax );
00556 }
00557 
00558 // /\* Get current stream number. *\/
00559 
00560 // void plplot_canvas_gstrm(PlplotCanvas* self, PLINT *p_strm) {
00561 //   plsstrm(self->Nstream);
00562 //   plgstrm(p_strm);
00563 // }
00564 
00565 // Get the current library version number
00566 
00567 void plplot_canvas_gver( PlplotCanvas* self, char *p_ver )
00568 {
00569     plsstrm( self->Nstream );
00570     plgver( p_ver );
00571 }
00572 
00573 // Get viewport boundaries in normalized device coordinates
00574 
00575 void plplot_canvas_gvpd( PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax )
00576 {
00577     plsstrm( self->Nstream );
00578     plgvpd( p_xmin, p_xmax, p_ymin, p_ymax );
00579 }
00580 
00581 // Get viewport boundaries in world coordinates
00582 
00583 void plplot_canvas_gvpw( PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax )
00584 {
00585     plsstrm( self->Nstream );
00586     plgvpw( p_xmin, p_xmax, p_ymin, p_ymax );
00587 }
00588 
00589 // Get x axis labeling parameters
00590 
00591 void plplot_canvas_gxax( PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits )
00592 {
00593     plsstrm( self->Nstream );
00594     plgxax( p_digmax, p_digits );
00595 }
00596 
00597 // Get y axis labeling parameters
00598 
00599 void plplot_canvas_gyax( PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits )
00600 {
00601     plsstrm( self->Nstream );
00602     plgyax( p_digmax, p_digits );
00603 }
00604 
00605 // Get z axis labeling parameters
00606 
00607 void plplot_canvas_gzax( PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits )
00608 {
00609     plsstrm( self->Nstream );
00610     plgzax( p_digmax, p_digits );
00611 }
00612 
00613 // Draws a histogram of n values of a variable in array data[0..n-1]
00614 
00615 void plplot_canvas_hist( PlplotCanvas* self, PLINT n, PLFLT *data, PLFLT datmin, PLFLT datmax, PLINT nbin, PLINT oldwin )
00616 {
00617     plsstrm( self->Nstream );
00618     plhist( n, data, datmin, datmax, nbin, oldwin );
00619 }
00620 
00621 // Set current color (map 0) by hue, lightness, and saturation.
00622 
00623 #ifdef PL_DEPRECATED
00624 void plplot_canvas_hls( PlplotCanvas* self, PLFLT h, PLFLT l, PLFLT s )
00625 {
00626     plsstrm( self->Nstream );
00627     plhls( h, l, s );
00628 }
00629 #endif  // PL_DEPRECATED
00630 
00631 // /\* Initializes PLplot, using preset or default options *\/
00632 
00633 // void plplot_canvas_plinit(PlplotCanvas* self) {
00634 //   plsstrm(self->Nstream);
00635 //   plinit();
00636 // }
00637 
00638 // Draws a line segment from (x1, y1) to (x2, y2).
00639 
00640 void plplot_canvas_join( PlplotCanvas* self, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 )
00641 {
00642     plsstrm( self->Nstream );
00643     pljoin( x1, y1, x2, y2 );
00644 }
00645 
00646 // Simple routine for labelling graphs.
00647 
00648 void plplot_canvas_lab( PlplotCanvas* self, const char *xlabel, const char *ylabel, const char *tlabel )
00649 {
00650     plsstrm( self->Nstream );
00651     pllab( xlabel, ylabel, tlabel );
00652 }
00653 
00654 // Sets position of the light source
00655 
00656 void plplot_canvas_lightsource( PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT z )
00657 {
00658     plsstrm( self->Nstream );
00659     pllightsource( x, y, z );
00660 }
00661 
00662 // Draws line segments connecting a series of points.
00663 
00664 void plplot_canvas_line( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y )
00665 {
00666     plsstrm( self->Nstream );
00667     plline( n, x, y );
00668 }
00669 
00670 // Draws a line in 3 space.
00671 
00672 void plplot_canvas_line3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z )
00673 {
00674     plsstrm( self->Nstream );
00675     plline3( n, x, y, z );
00676 }
00677 
00678 // Set line style.
00679 
00680 void plplot_canvas_lsty( PlplotCanvas* self, PLINT lin )
00681 {
00682     plsstrm( self->Nstream );
00683     pllsty( lin );
00684 }
00685 
00686 // plot continental outline in world coordinates
00687 
00688 void plplot_canvas_map( PlplotCanvas* self, void ( *mapform )( PLINT, PLFLT *, PLFLT * ), char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat )
00689 {
00690     plsstrm( self->Nstream );
00691     plmap( mapform, type, minlong, maxlong, minlat, maxlat );
00692 }
00693 
00694 // Plot the latitudes and longitudes on the background.
00695 
00696 void plplot_canvas_meridians( PlplotCanvas* self, void ( *mapform )( PLINT, PLFLT *, PLFLT * ), PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat )
00697 {
00698     plsstrm( self->Nstream );
00699     plmeridians( mapform, dlong, dlat, minlong, maxlong, minlat, maxlat );
00700 }
00701 
00702 // Plots a mesh representation of the function z[x][y].
00703 
00704 void plplot_canvas_mesh( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt )
00705 {
00706     plsstrm( self->Nstream );
00707     plmesh( x, y, z, nx, ny, opt );
00708 }
00709 
00710 // Plots a mesh representation of the function z[x][y] with contour
00711 
00712 void plplot_canvas_meshc( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel )
00713 {
00714     plsstrm( self->Nstream );
00715     plmeshc( x, y, z, nx, ny, opt, clevel, nlevel );
00716 }
00717 
00718 // /\* Creates a new stream and makes it the default.  *\/
00719 
00720 // void plplot_canvas_plmkstrm(PlplotCanvas* self, PLINT *p_strm) {
00721 //   plsstrm(self->Nstream);
00722 //   plmkstrm(p_strm);
00723 // }
00724 
00725 // Prints out "text" at specified position relative to viewport
00726 
00727 void plplot_canvas_mtex( PlplotCanvas* self, const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text )
00728 {
00729     plsstrm( self->Nstream );
00730     plmtex( side, disp, pos, just, text );
00731 }
00732 
00733 // Plots a 3-d representation of the function z[x][y].
00734 
00735 void plplot_canvas_plot3d( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLINT side )
00736 {
00737     plsstrm( self->Nstream );
00738     plot3d( x, y, z, nx, ny, opt, side );
00739 }
00740 
00741 // Plots a 3-d representation of the function z[x][y] with contour.
00742 
00743 void plplot_canvas_plot3dc( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel )
00744 {
00745     plsstrm( self->Nstream );
00746     plot3dc( x, y, z, nx, ny, opt, clevel, nlevel );
00747 }
00748 
00749 // Plots a 3-d representation of the function z[x][y] with contour and
00750 // y index limits.
00751 
00752 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 )
00753 {
00754     plsstrm( self->Nstream );
00755     plot3dcl( x, y, z, nx, ny, opt, clevel, nlevel, ixstart, ixn, indexymin, indexymax );
00756 }
00757 
00758 // Set fill pattern directly.
00759 
00760 void plplot_canvas_pat( PlplotCanvas* self, PLINT nlin, PLINT *inc, PLINT *del )
00761 {
00762     plsstrm( self->Nstream );
00763     plpat( nlin, inc, del );
00764 }
00765 
00766 // Plots array y against x for n points using ASCII code "code".
00767 
00768 void plplot_canvas_poin( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code )
00769 {
00770     plsstrm( self->Nstream );
00771     plpoin( n, x, y, code );
00772 }
00773 
00774 // Draws a series of points in 3 space.
00775 
00776 void plplot_canvas_poin3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT code )
00777 {
00778     plsstrm( self->Nstream );
00779     plpoin3( n, x, y, z, code );
00780 }
00781 
00782 // Draws a polygon in 3 space.
00783 
00784 void plplot_canvas_poly3( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *draw, PLINT ifcc )
00785 {
00786     plsstrm( self->Nstream );
00787     plpoly3( n, x, y, z, draw, ifcc );
00788 }
00789 
00790 // Set the floating point precision (in number of places) in numeric labels.
00791 
00792 void plplot_canvas_prec( PlplotCanvas* self, PLINT setp, PLINT prec )
00793 {
00794     plsstrm( self->Nstream );
00795     plprec( setp, prec );
00796 }
00797 
00798 // Set fill pattern, using one of the predefined patterns.
00799 
00800 void plplot_canvas_psty( PlplotCanvas* self, PLINT patt )
00801 {
00802     plsstrm( self->Nstream );
00803     plpsty( patt );
00804 }
00805 
00806 // Prints out "text" at world cooordinate (x,y).
00807 
00808 void plplot_canvas_ptex( PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, const char *text )
00809 {
00810     plsstrm( self->Nstream );
00811     plptex( x, y, dx, dy, just, text );
00812 }
00813 
00814 // Replays contents of plot buffer to current device/file.
00815 
00816 void plplot_canvas_replot( PlplotCanvas* self )
00817 {
00818     plsstrm( self->Nstream );
00819     plreplot();
00820 }
00821 
00822 #ifdef PL_DEPRECATED
00823 // Set line color by red, green, blue from  0. to 1.
00824 
00825 void plplot_canvas_rgb( PlplotCanvas* self, PLFLT r, PLFLT g, PLFLT b )
00826 {
00827     plsstrm( self->Nstream );
00828     plrgb( r, g, b );
00829 }
00830 
00831 // Set line color by 8 bit RGB values.
00832 
00833 void plplot_canvas_rgb1( PlplotCanvas* self, PLINT r, PLINT g, PLINT b )
00834 {
00835     plsstrm( self->Nstream );
00836     plrgb1( r, g, b );
00837 }
00838 #endif  // PL_DEPRECATED
00839 
00840 // Set character height.
00841 
00842 void plplot_canvas_schr( PlplotCanvas* self, PLFLT def, PLFLT scale )
00843 {
00844     plsstrm( self->Nstream );
00845     plschr( def, scale );
00846 }
00847 
00848 // Set color map 0 colors by 8 bit RGB values
00849 
00850 void plplot_canvas_scmap0( PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol0 )
00851 {
00852     plsstrm( self->Nstream );
00853     plscmap0( r, g, b, ncol0 );
00854 }
00855 
00856 // Set number of colors in cmap 0
00857 
00858 void plplot_canvas_scmap0n( PlplotCanvas* self, PLINT ncol0 )
00859 {
00860     plsstrm( self->Nstream );
00861     plscmap0n( ncol0 );
00862 }
00863 
00864 // Set color map 1 colors by 8 bit RGB values
00865 
00866 void plplot_canvas_scmap1( PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol1 )
00867 {
00868     plsstrm( self->Nstream );
00869     plscmap1( r, g, b, ncol1 );
00870 }
00871 
00872 // Set color map 1 colors using a piece-wise linear relationship between
00873 // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
00874 
00875 void plplot_canvas_scmap1l( PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *rev )
00876 {
00877     plsstrm( self->Nstream );
00878     plscmap1l( itype, npts, intensity, coord1, coord2, coord3, rev );
00879 }
00880 
00881 // Set number of colors in cmap 1
00882 
00883 void plplot_canvas_scmap1n( PlplotCanvas* self, PLINT ncol1 )
00884 {
00885     plsstrm( self->Nstream );
00886     plscmap1n( ncol1 );
00887 }
00888 
00889 // Set a given color from color map 0 by 8 bit RGB value
00890 
00891 void plplot_canvas_scol0( PlplotCanvas* self, PLINT icol0, PLINT r, PLINT g, PLINT b )
00892 {
00893     plsstrm( self->Nstream );
00894     plscol0( icol0, r, g, b );
00895 }
00896 
00897 // Set the background color by 8 bit RGB value
00898 
00899 void plplot_canvas_scolbg( PlplotCanvas* self, PLINT r, PLINT g, PLINT b )
00900 {
00901     plsstrm( self->Nstream );
00902     plscolbg( r, g, b );
00903 }
00904 
00905 // Used to globally turn color output on/off
00906 
00907 void plplot_canvas_scolor( PlplotCanvas* self, PLINT color )
00908 {
00909     plsstrm( self->Nstream );
00910     plscolor( color );
00911 }
00912 
00913 // Set the compression level
00914 
00915 void plplot_canvas_scompression( PlplotCanvas* self, PLINT compression )
00916 {
00917     plsstrm( self->Nstream );
00918     plscompression( compression );
00919 }
00920 
00921 // /\* Set the device (keyword) name *\/
00922 
00923 // void plplot_canvas_plsdev(PlplotCanvas* self, const char *devname) {
00924 //   plsstrm(self->Nstream);
00925 //   plsdev(devname);
00926 // }
00927 
00928 // Set window into device space using margin, aspect ratio, and
00929 // justification
00930 
00931 void plplot_canvas_sdidev( PlplotCanvas* self, PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy )
00932 {
00933     plsstrm( self->Nstream );
00934     plsdidev( mar, aspect, jx, jy );
00935 }
00936 
00937 // Set up transformation from metafile coordinates.
00938 
00939 void plplot_canvas_sdimap( PlplotCanvas* self, PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax, PLFLT dimxpmm, PLFLT dimypmm )
00940 {
00941     plsstrm( self->Nstream );
00942     plsdimap( dimxmin, dimxmax, dimymin, dimymax, dimxpmm, dimypmm );
00943 }
00944 
00945 // Set plot orientation, specifying rotation in units of pi/2.
00946 
00947 void plplot_canvas_sdiori( PlplotCanvas* self, PLFLT rot )
00948 {
00949     plsstrm( self->Nstream );
00950     plsdiori( rot );
00951 }
00952 
00953 // Set window into plot space
00954 
00955 void plplot_canvas_sdiplt( PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax )
00956 {
00957     plsstrm( self->Nstream );
00958     plsdiplt( xmin, ymin, xmax, ymax );
00959 }
00960 
00961 // Set window into plot space incrementally (zoom)
00962 
00963 void plplot_canvas_sdiplz( PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax )
00964 {
00965     plsstrm( self->Nstream );
00966     plsdiplz( xmin, ymin, xmax, ymax );
00967 }
00968 
00969 // Set the escape character for text strings.
00970 
00971 void plplot_canvas_sesc( PlplotCanvas* self, char esc )
00972 {
00973     plsstrm( self->Nstream );
00974     plsesc( esc );
00975 }
00976 
00977 // /\* Set family file parameters *\/
00978 
00979 // void plplot_canvas_sfam(PlplotCanvas* self, PLINT fam, PLINT num, PLINT bmax) {
00980 //   plsstrm(self->Nstream);
00981 //   plsfam(fam, num, bmax);
00982 // }
00983 
00984 // Set FCI (font characterization integer)
00985 
00986 void plplot_canvas_sfci( PlplotCanvas* self, PLUNICODE fci )
00987 {
00988     plsstrm( self->Nstream );
00989     plsfci( fci );
00990 }
00991 
00992 // Set the output file name.
00993 
00994 void plplot_canvas_sfnam( PlplotCanvas* self, const char *fnam )
00995 {
00996     plsstrm( self->Nstream );
00997     plsfnam( fnam );
00998 }
00999 
01000 // Shade region.
01001 
01002 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 )
01003 {
01004     plsstrm( self->Nstream );
01005     plshade( a, nx, ny, defined, left, right, bottom, top, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, fill, rectangular, pltr, pltr_data );
01006 }
01007 
01008 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 )
01009 {
01010     plsstrm( self->Nstream );
01011     plshade1( a, nx, ny, defined, left, right, bottom, top, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, fill, rectangular, pltr, pltr_data );
01012 }
01013 
01014 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 )
01015 {
01016     plsstrm( self->Nstream );
01017     plshades( a, nx, ny, defined, xmin, xmax, ymin, ymax, clevel, nlevel, fill_width, cont_color, cont_width, fill, rectangular, pltr, pltr_data );
01018 }
01019 
01020 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 )
01021 {
01022     plsstrm( self->Nstream );
01023     plfshade( f2eval, f2eval_data, c2eval, c2eval_data, nx, ny, left, right, bottom, top, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, fill, rectangular, pltr, pltr_data );
01024 }
01025 
01026 // Set up lengths of major tick marks.
01027 
01028 void plplot_canvas_smaj( PlplotCanvas* self, PLFLT def, PLFLT scale )
01029 {
01030     plsstrm( self->Nstream );
01031     plsmaj( def, scale );
01032 }
01033 
01034 // /\* Set the memory area to be plotted (with the 'mem' driver) *\/
01035 
01036 // void plplot_canvas_smem(PlplotCanvas* self, PLINT maxx, PLINT maxy, void *plotmem) {
01037 //   plsstrm(self->Nstream);
01038 //   plsmem(maxx, maxy, plotmem);
01039 // }
01040 
01041 // Set up lengths of minor tick marks.
01042 
01043 void plplot_canvas_smin( PlplotCanvas* self, PLFLT def, PLFLT scale )
01044 {
01045     plsstrm( self->Nstream );
01046     plsmin( def, scale );
01047 }
01048 
01049 // /\* Set orientation.  Must be done before calling plinit. *\/
01050 
01051 // void plplot_canvas_sori(PlplotCanvas* self, PLINT ori) {
01052 //   plsstrm(self->Nstream);
01053 //   plsori(ori);
01054 // }
01055 
01056 // Set output device parameters.  Usually ignored by the driver.
01057 
01058 void plplot_canvas_spage( PlplotCanvas* self, PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, PLINT xoff, PLINT yoff )
01059 {
01060     plsstrm( self->Nstream );
01061     plspage( xp, yp, xleng, yleng, xoff, yoff );
01062 }
01063 
01064 // /\* Set the pause (on end-of-page) status *\/
01065 
01066 // void plplot_canvas_spause(PlplotCanvas* self, PLINT pause) {
01067 //   plsstrm(self->Nstream);
01068 //   plspause(pause);
01069 // }
01070 
01071 // /\* Set stream number.  *\/
01072 
01073 // void plplot_canvas_sstrm(PlplotCanvas* self, PLINT strm) {
01074 //   plsstrm(self->Nstream);
01075 //   plsstrm(strm);
01076 // }
01077 
01078 // Set the number of subwindows in x and y
01079 
01080 void plplot_canvas_ssub( PlplotCanvas* self, PLINT nx, PLINT ny )
01081 {
01082     plsstrm( self->Nstream );
01083     plssub( nx, ny );
01084 }
01085 
01086 // Set symbol height.
01087 
01088 void plplot_canvas_ssym( PlplotCanvas* self, PLFLT def, PLFLT scale )
01089 {
01090     plsstrm( self->Nstream );
01091     plssym( def, scale );
01092 }
01093 
01094 // /\* Initialize PLplot, passing in the windows/page settings. *\/
01095 
01096 // void plplot_canvas_star(PlplotCanvas* self, PLINT nx, PLINT ny) {
01097 //   plsstrm(self->Nstream);
01098 //   plstar(nx, ny);
01099 // }
01100 
01101 // /\* Initialize PLplot, passing the device name and windows/page settings. *\/
01102 
01103 // void plplot_canvas_start(PlplotCanvas* self, const char *devname, PLINT nx, PLINT ny) {
01104 //   plsstrm(self->Nstream);
01105 //   plstart(devname, nx, ny);
01106 // }
01107 
01108 // /\* Add a point to a stripchart.  *\/
01109 
01110 // void plplot_canvas_stripa(PlplotCanvas* self, PLINT id, PLINT pen, PLFLT x, PLFLT y) {
01111 //   plsstrm(self->Nstream);
01112 //   plstripa(id, pen, x, y);
01113 // }
01114 
01115 // /\* Create 1d stripchart *\/
01116 
01117 // 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) {
01118 //   plsstrm(self->Nstream);
01119 //   plstripc(id, xspec, yspec, xmin, xmax, xjump, ymin, ymax, xlpos, ylpos, y_ascl, acc, colbox, collab, colline, styline, legline, labx, laby, labtop);
01120 // }
01121 
01122 // /\* Deletes and releases memory used by a stripchart.  *\/
01123 
01124 // void plplot_canvas_stripd(PlplotCanvas* self, PLINT id) {
01125 //   plsstrm(self->Nstream);
01126 //   plstripd(id);
01127 // }
01128 
01129 // plots a 2d image (or a matrix too large for plshade() )
01130 
01131 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 )
01132 {
01133     plsstrm( self->Nstream );
01134     plimage( data, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax );
01135 }
01136 
01137 // Set up a new line style
01138 
01139 void plplot_canvas_styl( PlplotCanvas* self, PLINT nms, PLINT *mark, PLINT *space )
01140 {
01141     plsstrm( self->Nstream );
01142     plstyl( nms, mark, space );
01143 }
01144 
01145 // Plots the 3d surface representation of the function z[x][y].
01146 
01147 void plplot_canvas_surf3d( PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel )
01148 {
01149     plsstrm( self->Nstream );
01150     plsurf3d( x, y, z, nx, ny, opt, clevel, nlevel );
01151 }
01152 
01153 // Plots the 3d surface representation of the function z[x][y] with y
01154 // index limits.
01155 
01156 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 )
01157 {
01158     plsstrm( self->Nstream );
01159     plsurf3dl( x, y, z, nx, ny, opt, clevel, nlevel, ixstart, ixn, indexymin, indexymax );
01160 }
01161 
01162 // Sets the edges of the viewport to the specified absolute coordinates
01163 
01164 void plplot_canvas_svpa( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax )
01165 {
01166     plsstrm( self->Nstream );
01167     plsvpa( xmin, xmax, ymin, ymax );
01168 }
01169 
01170 // Set x axis labeling parameters
01171 
01172 void plplot_canvas_sxax( PlplotCanvas* self, PLINT digmax, PLINT digits )
01173 {
01174     plsstrm( self->Nstream );
01175     plsxax( digmax, digits );
01176 }
01177 
01178 // Set inferior X window
01179 
01180 void plplot_canvas_sxwin( PlplotCanvas* self, PLINT window_id )
01181 {
01182     plsstrm( self->Nstream );
01183     plsxwin( window_id );
01184 }
01185 
01186 // Set y axis labeling parameters
01187 
01188 void plplot_canvas_syax( PlplotCanvas* self, PLINT digmax, PLINT digits )
01189 {
01190     plsstrm( self->Nstream );
01191     plsyax( digmax, digits );
01192 }
01193 
01194 // Plots array y against x for n points using Hershey symbol "code"
01195 
01196 void plplot_canvas_sym( PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code )
01197 {
01198     plsstrm( self->Nstream );
01199     plsym( n, x, y, code );
01200 }
01201 
01202 // Set z axis labeling parameters
01203 
01204 void plplot_canvas_szax( PlplotCanvas* self, PLINT digmax, PLINT digits )
01205 {
01206     plsstrm( self->Nstream );
01207     plszax( digmax, digits );
01208 }
01209 
01210 // Switches to text screen.
01211 
01212 void plplot_canvas_text( PlplotCanvas* self )
01213 {
01214     plsstrm( self->Nstream );
01215     pltext();
01216 }
01217 
01218 // Sets the edges of the viewport with the given aspect ratio, leaving
01219 // room for labels.
01220 
01221 void plplot_canvas_vasp( PlplotCanvas* self, PLFLT aspect )
01222 {
01223     plsstrm( self->Nstream );
01224     plvasp( aspect );
01225 }
01226 
01227 // Creates the largest viewport of the specified aspect ratio that fits
01228 // within the specified normalized subpage coordinates.
01229 
01230 void plplot_canvas_vpas( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect )
01231 {
01232     plsstrm( self->Nstream );
01233     plvpas( xmin, xmax, ymin, ymax, aspect );
01234 }
01235 
01236 // Creates a viewport with the specified normalized subpage coordinates.
01237 
01238 void plplot_canvas_vpor( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax )
01239 {
01240     plsstrm( self->Nstream );
01241     plvpor( xmin, xmax, ymin, ymax );
01242 }
01243 
01244 // Defines a "standard" viewport with seven character heights for
01245 // the left margin and four character heights everywhere else.
01246 
01247 void plplot_canvas_vsta( PlplotCanvas* self )
01248 {
01249     plsstrm( self->Nstream );
01250     plvsta();
01251 }
01252 
01253 // Set up a window for three-dimensional plotting.
01254 
01255 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 )
01256 {
01257     plsstrm( self->Nstream );
01258     plw3d( basex, basey, height, xmin0, xmax0, ymin0, ymax0, zmin0, zmax0, alt, az );
01259 }
01260 
01261 // Set pen width.
01262 
01263 void plplot_canvas_wid( PlplotCanvas* self, PLINT width )
01264 {
01265     plsstrm( self->Nstream );
01266     plwid( width );
01267 }
01268 
01269 // Set up world coordinates of the viewport boundaries (2d plots).
01270 
01271 void plplot_canvas_wind( PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax )
01272 {
01273     plsstrm( self->Nstream );
01274     plwind( xmin, xmax, ymin, ymax );
01275 }
01276 
01277 //  set xor mode; mode = 1-enter, 0-leave, status = 0 if not interactive device
01278 
01279 void plplot_canvas_xormod( PlplotCanvas* self, PLINT mode, PLINT *status )
01280 {
01281     plsstrm( self->Nstream );
01282     plxormod( mode, status );
01283 }
01284 

Generated on Wed Oct 12 2011 20:42:22 for PLplot by  doxygen 1.7.1