1 //----------------------------------*-C++-*----------------------------------// 2 // Copyright (C) 1995 Geoffrey Furnish 3 // Copyright (C) 1995-2002 Maurice LeBrun 4 // Copyright (C) 2000-2018 Alan W. Irwin 5 // Copyright (C) 2003-2013 Andrew Ross 6 // Copyright (C) 2004-2005 Rafael Laboissiere 7 // Copyright (C) 2006-2008 Werner Smekal 8 // Copyright (C) 2009 Hazen Babcock 9 // Copyright (C) 2010-2011 Hezekiah M. Carty 10 // Copyright (C) 2014-2015 Phil Rosenberg 11 // 12 // This file is part of PLplot. 13 // 14 // PLplot is free software; you can redistribute it and/or modify 15 // it under the terms of the GNU Library General Public License as published 16 // by the Free Software Foundation; either version 2 of the License, or 17 // (at your option) any later version. 18 // 19 // PLplot is distributed in the hope that it will be useful, 20 // but WITHOUT ANY WARRANTY; without even the implied warranty of 21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 // GNU Library General Public License for more details. 23 // 24 // You should have received a copy of the GNU Library General Public License 25 // along with PLplot; if not, write to the Free Software 26 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 27 28 //-------------------------------------------------------------------------- 29 // @> Header file plstream. 30 //-------------------------------------------------------------------------- 31 32 #ifndef __plstream_h__ 33 #define __plstream_h__ 34 35 #include "plplot.h" 36 37 class PLS { 38 public: 39 enum stream_id { Next, Current, Specific }; 40 }; 41 42 enum PLcolor { Black = 0, Red, Yellow, Green, 43 Cyan, Pink, Tan, Grey, 44 DarkRed, DeepBlue, Purple, LightCyan, 45 LightBlue, Orchid, Mauve, White }; 46 47 // A class for assisting in generalizing the data prescription 48 // interface to the contouring routines. 49 50 class Contourable_Data { 51 int _nx, _ny; 52 public: Contourable_Data(int nx,int ny)53 Contourable_Data( int nx, int ny ) : _nx( nx ), _ny( ny ) {} elements(int & nx,int & ny)54 virtual void elements( int& nx, int& ny ) const { nx = _nx; ny = _ny; } 55 virtual PLFLT operator()( int i, int j ) const = 0; ~Contourable_Data()56 virtual ~Contourable_Data() {}; 57 }; 58 59 PLDLLIMPEXP_CXX PLFLT Contourable_Data_evaluator( PLINT i, PLINT j, PLPointer p ); 60 61 class PLDLLIMPEXP_CXX Coord_Xformer { 62 public: 63 virtual void xform( PLFLT ox, PLFLT oy, PLFLT& nx, PLFLT& ny ) const = 0; ~Coord_Xformer()64 virtual ~Coord_Xformer() {}; 65 }; 66 67 PLDLLIMPEXP_CXX void Coord_Xform_evaluator( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ); 68 69 class Coord_2d { 70 public: 71 virtual PLFLT operator()( int ix, int iy ) const = 0; 72 virtual void elements( int& _nx, int& _ny ) = 0; 73 virtual void min_max( PLFLT& _min, PLFLT& _max ) = 0; ~Coord_2d()74 virtual ~Coord_2d() {}; 75 }; 76 77 class PLDLLIMPEXP_CXX cxx_pltr2 : public Coord_Xformer { 78 Coord_2d& xg; 79 Coord_2d& yg; 80 public: 81 cxx_pltr2( Coord_2d & cx, Coord_2d & cy ); 82 void xform( PLFLT x, PLFLT y, PLFLT& tx, PLFLT& ty ) const; 83 }; 84 85 //-------------------------------------------------------------------------- 86 //Callback functions for passing into various API methods. We provide these 87 //wrappers to avoid a requirement for linking to the C shared library. 88 //-------------------------------------------------------------------------- 89 90 namespace plcallback 91 { 92 // Callback for plfill. This will just call the C plfill function 93 94 PLDLLIMPEXP_CXX void fill( PLINT n, const PLFLT *x, const PLFLT *y ); 95 96 // Identity transformation. 97 98 PLDLLIMPEXP_CXX void tr0( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 99 100 // Does linear interpolation from singly dimensioned coord arrays. 101 102 PLDLLIMPEXP_CXX void tr1( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 103 104 // Does linear interpolation from doubly dimensioned coord arrays 105 // (column dominant, as per normal C 2d arrays). 106 107 PLDLLIMPEXP_CXX void tr2( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 108 109 // Just like pltr2() but uses pointer arithmetic to get coordinates from 110 // 2d grid tables. 111 112 PLDLLIMPEXP_CXX void tr2p( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 113 } 114 115 //-------------------------------------------------------------------------- 116 // class plstream - C++ class for encapsulating PLplot streams 117 118 // Cool stuff. 119 //-------------------------------------------------------------------------- 120 121 class PLDLLIMPEXP_CXX plstream { 122 PLINT stream; 123 124 static PLINT active_streams; 125 126 private: 127 // These have to be disabled till we implement reference counting. 128 129 plstream( const plstream & ); 130 plstream& operator=( const plstream& ); 131 132 protected: set_stream(void)133 virtual void set_stream( void ) { ::c_plsstrm( stream ); } 134 135 public: 136 plstream( void ); 137 plstream( plstream * pls ); 138 plstream( PLS::stream_id sid, PLINT strm = 0 ); plstream(PLINT _stream)139 plstream( PLINT _stream ) : stream( _stream ) {} 140 plstream( PLINT nx /*=1*/, PLINT ny /*=1*/, 141 const char *driver = NULL, const char *file = NULL ); 142 plstream( PLINT nx /*=1*/, PLINT ny /*=1*/, PLINT r, PLINT g, PLINT b, 143 const char *driver = NULL, const char *file = NULL ); 144 145 virtual ~plstream( void ); 146 147 // Now start miroring the PLplot C API. 148 149 // C routines callable from stub routines come first 150 151 // Advance to subpage "page", or to the next one if "page" = 0. 152 153 void adv( PLINT page ); 154 155 // Plot an arc 156 157 void arc( PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2, 158 PLFLT rotate, PLBOOL fill ); 159 160 void vect( const PLFLT * const *u, const PLFLT * const *v, PLINT nx, PLINT ny, PLFLT scale, 161 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 162 163 // Set the arrow style 164 void svect( const PLFLT *arrow_x = NULL, const PLFLT *arrow_y = NULL, PLINT npts = 0, bool fill = false ); 165 166 // This functions similarly to plbox() except that the origin of the axes is 167 // placed at the user-specified point (x0, y0). 168 169 void axes( PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub, 170 const char *yopt, PLFLT ytick, PLINT nysub ); 171 172 // Plot a histogram using x to store data values and y to store frequencies. 173 174 void bin( PLINT nbin, const PLFLT *x, const PLFLT *y, PLINT center ); 175 176 // Start new page. Should only be used with pleop(). 177 178 void bop( void ); 179 180 // This draws a box around the current viewport. 181 182 void box( const char *xopt, PLFLT xtick, PLINT nxsub, 183 const char *yopt, PLFLT ytick, PLINT nysub ); 184 185 // This is the 3-d analogue of plbox(). 186 187 void box3( const char *xopt, const char *xlabel, PLFLT xtick, PLINT nsubx, 188 const char *yopt, const char *ylabel, PLFLT ytick, PLINT nsuby, 189 const char *zopt, const char *zlabel, PLFLT ztick, PLINT nsubz ); 190 191 // Calculate broken-down time from continuous time for current stream. 192 193 void btime( PLINT &year, PLINT &month, PLINT &day, PLINT &hour, 194 PLINT &min, PLFLT &sec, PLFLT ctime ); 195 196 // Calculate world coordinates and subpage from relative device coordinates. 197 198 void calc_world( PLFLT rx, PLFLT ry, PLFLT& wx, PLFLT& wy, PLINT& window ); 199 200 // Clear the current subpage. 201 202 void clear( void ); 203 204 // Set color, map 0. Argument is integer between 0 and 15. 205 206 void col0( PLINT icol0 ); 207 208 // Set the color using a descriptive name. Replaces plcol0(). (Except that 209 // col0 won't die.) 210 211 void col( PLcolor c ); 212 213 // Set color, map 1. Argument is a float between 0. and 1. 214 215 void col1( PLFLT c ); 216 217 #ifdef PL_DEPRECATED 218 // Previous function was inadvertently named plcol in old versions of 219 // plplot - this is maintained for backwards compatibility, but is best 220 // avoided in new code. 221 void col( PLFLT c ); 222 #endif //PL_DEPRECATED 223 224 // Configure transformation between continuous and broken-down time (and 225 // vice versa) for current stream. 226 void configtime( PLFLT scale, PLFLT offset1, PLFLT offset2, 227 PLINT ccontrol, PLBOOL ifbtime_offset, PLINT year, 228 PLINT month, PLINT day, PLINT hour, PLINT min, PLFLT sec ); 229 230 // Draws a contour plot from data in f(nx,ny). Is just a front-end to 231 // plfcont, with a particular choice for f2eval and f2eval_data. 232 233 void cont( const PLFLT * const *f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, 234 PLINT ky, PLINT ly, const PLFLT * clevel, PLINT nlevel, 235 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 236 237 // Draws a contour plot using the function evaluator f2eval and data stored 238 // by way of the f2eval_data pointer. This allows arbitrary organizations 239 // of 2d array data to be used. 240 241 void fcont( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), 242 PLPointer f2eval_data, 243 PLINT nx, PLINT ny, PLINT kx, PLINT lx, 244 PLINT ky, PLINT ly, const PLFLT * clevel, PLINT nlevel, 245 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 246 247 // Copies state parameters from the reference stream to the current stream. 248 249 void cpstrm( plstream &pls, bool flags ); 250 251 // Calculate continuous time from broken-down time for current stream. 252 void ctime( PLINT year, PLINT month, PLINT day, PLINT hour, PLINT min, 253 PLFLT sec, PLFLT &ctime ); 254 255 // Converts input values from relative device coordinates to relative plot 256 // coordinates. 257 258 void did2pc( PLFLT& xmin, PLFLT& ymin, PLFLT& xmax, PLFLT& ymax ); 259 260 // Converts input values from relative plot coordinates to relative device 261 // coordinates. 262 263 void dip2dc( PLFLT& xmin, PLFLT& ymin, PLFLT& xmax, PLFLT& ymax ); 264 265 // These shouldn't be needed, are supposed to be handled by ctor/dtor 266 // semantics of the plstream object. 267 268 // End a plotting session for all open streams. 269 270 // void end(); 271 272 // End a plotting session for the current stream only. 273 274 // void end1(); 275 276 // Simple interface for defining viewport and window. 277 278 void env( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 279 PLINT just, PLINT axis ); 280 281 // similar to env() above, but in multiplot mode does not advance 282 // the subpage, instead the current subpage is cleared 283 284 void env0( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 285 PLINT just, PLINT axis ); 286 287 // End current page. Should only be used with plbop(). 288 289 void eop( void ); 290 291 // Plot horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i)). 292 293 void errx( PLINT n, const PLFLT *xmin, const PLFLT *xmax, const PLFLT *y ); 294 295 // Plot vertical error bars (x,ymin(i)) to (x(i),ymax(i)). 296 297 void erry( PLINT n, const PLFLT *x, const PLFLT *ymin, const PLFLT *ymax ); 298 299 // Advance to the next family file on the next new page. 300 301 void famadv( void ); 302 303 // Pattern fills the polygon bounded by the input points. 304 305 void fill( PLINT n, const PLFLT *x, const PLFLT *y ); 306 307 // Pattern fills the 3d polygon bounded by the input points. 308 309 void fill3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z ); 310 311 // Flushes the output stream. Use sparingly, if at all. 312 313 void flush( void ); 314 315 // Sets the global font flag to 'ifont'. 316 317 void font( PLINT ifont ); 318 319 // Load specified font set. 320 321 void fontld( PLINT fnt ); 322 323 // Get character default height and current (scaled) height. 324 325 void gchr( PLFLT& p_def, PLFLT& p_ht ); 326 327 // Returns 8 bit RGB values for given color from color map 0. 328 329 void gcol0( PLINT icol0, PLINT& r, PLINT& g, PLINT& b ); 330 331 // Returns 8 bit RGB and 0.0-1.0 alpha values for given color from color map 0. 332 333 void gcol0a( PLINT icol0, PLINT& r, PLINT& g, PLINT& b, PLFLT& a ); 334 335 // Returns the background color by 8 bit RGB value. 336 337 void gcolbg( PLINT& r, PLINT& g, PLINT& b ); 338 339 // Returns the background color by 8 bit RGB and 0.0-1.0 alpha values. 340 341 void gcolbga( PLINT& r, PLINT& g, PLINT& b, PLFLT& a ); 342 343 // Returns the current compression setting 344 345 void gcompression( PLINT& compression ); 346 347 // Retrieve current window into device space. 348 349 void gdidev( PLFLT& mar, PLFLT& aspect, PLFLT& jx, PLFLT& jy ); 350 351 // Get plot orientation. 352 353 void gdiori( PLFLT& rot ); 354 355 // Retrieve current window into plot space. 356 357 void gdiplt( PLFLT& xmin, PLFLT& ymin, PLFLT& xmax, PLFLT& ymax ); 358 359 // Get FCI (font characterization integer) 360 361 void gfci( PLUNICODE& pfci ); 362 363 // Get family file parameters. 364 365 void gfam( PLINT& fam, PLINT& num, PLINT& bmax ); 366 367 // Get the (current) output file name. Must be preallocated to >80 bytes. 368 369 void gfnam( char *fnam ); 370 371 // Get the current font family, style and weight 372 373 void gfont( PLINT& family, PLINT& style, PLINT& weight ); 374 375 // Get the (current) run level. 376 377 void glevel( PLINT &p_level ); 378 379 // Get output device parameters. 380 381 void gpage( PLFLT& xp, PLFLT& yp, PLINT& xleng, PLINT& yleng, 382 PLINT& xoff, PLINT& yoff ); 383 384 // Switches to graphics screen. 385 386 void gra( void ); 387 388 // Draw gradient in polygon. 389 390 void gradient( PLINT n, const PLFLT *x, const PLFLT *y, PLFLT angle ); 391 392 // grid irregularly sampled data 393 394 void griddata( const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT npts, 395 const PLFLT *xg, PLINT nptsx, const PLFLT *yg, PLINT nptsy, 396 PLFLT **zg, PLINT type, PLFLT data ); 397 398 // Get subpage boundaries in absolute coordinates. 399 400 void gspa( PLFLT& xmin, PLFLT& xmax, PLFLT& ymin, PLFLT& ymax ); 401 402 // This shouldn't be needed in this model. 403 404 // Get current stream number. 405 406 // void gstrm( PLINT *p_strm ); 407 408 // Get the current library version number. 409 410 void gver( char *p_ver ); 411 412 // Get the viewport window in normalized device coordinates 413 414 void gvpd( PLFLT& xmin, PLFLT& xmax, PLFLT& ymin, PLFLT& ymax ); 415 416 // Get the viewport window in world coordinates 417 418 void gvpw( PLFLT& xmin, PLFLT& xmax, PLFLT& ymin, PLFLT& ymax ); 419 420 // Get x axis labeling parameters. 421 422 void gxax( PLINT& digmax, PLINT& digits ); 423 424 // Get y axis labeling parameters. 425 426 void gyax( PLINT& digmax, PLINT& digits ); 427 428 // Get z axis labeling parameters 429 430 void gzax( PLINT& digmax, PLINT& digits ); 431 432 // Draws a histogram of n values of a variable in array data[0..n-1] 433 434 void hist( PLINT n, const PLFLT *data, PLFLT datmin, PLFLT datmax, 435 PLINT nbin, PLINT oldwin ); 436 437 // Initializes PLplot, using preset or default options 438 439 void init( void ); 440 441 // Draws a line segment from (x1, y1) to (x2, y2). 442 443 void join( PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 ); 444 445 // Simple routine for labelling graphs. 446 447 void lab( const char *xlabel, const char *ylabel, const char *tlabel ); 448 449 // Routine for drawing line, symbol, or cmap0 legends 450 void legend( PLFLT *p_legend_width, PLFLT *p_legend_height, 451 PLINT opt, PLINT position, PLFLT x, PLFLT y, PLFLT plot_width, 452 PLINT bg_color, PLINT bb_color, PLINT bb_style, 453 PLINT nrow, PLINT ncolumn, 454 PLINT nlegend, const PLINT *opt_array, 455 PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, 456 PLFLT text_justification, 457 const PLINT *text_colors, const char * const *text, 458 const PLINT *box_colors, const PLINT *box_patterns, 459 const PLFLT *box_scales, const PLFLT *box_line_widths, 460 const PLINT *line_colors, const PLINT *line_styles, 461 const PLFLT *line_widths, 462 const PLINT *symbol_colors, const PLFLT *symbol_scales, 463 const PLINT *symbol_numbers, const char * const *symbols ); 464 465 void colorbar( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height, 466 PLINT opt, PLINT position, PLFLT x, PLFLT y, 467 PLFLT x_length, PLFLT y_length, 468 PLINT bg_color, PLINT bb_color, PLINT bb_style, 469 PLFLT low_cap_color, PLFLT high_cap_color, 470 PLINT cont_color, PLFLT cont_width, 471 PLINT n_labels, PLINT *label_opts, const char * const *label, 472 PLINT n_axes, const char * const *axis_opts, 473 PLFLT *ticks, PLINT *sub_ticks, 474 PLINT *n_values, const PLFLT * const *values ); 475 476 // Sets position of the light source 477 478 void lightsource( PLFLT x, PLFLT y, PLFLT z ); 479 480 // Draws line segments connecting a series of points. 481 482 void line( PLINT n, const PLFLT *x, const PLFLT *y ); 483 484 // Draws a line in 3 space. 485 486 void line3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z ); 487 488 // Set line style. 489 490 void lsty( PLINT lin ); 491 492 // Plot continental outline in world coordinates 493 494 void map( PLMAPFORM_callback mapform, const char *name, 495 PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy ); 496 497 // Plot map lines 498 499 void mapline( PLMAPFORM_callback mapform, const char *name, 500 PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, 501 const PLINT *plotentries, PLINT nplotentries ); 502 503 // Plot map points 504 505 void mapstring( PLMAPFORM_callback mapform, 506 const char *name, const char *string, 507 PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, 508 const PLINT *plotentries, PLINT nplotentries ); 509 510 // Plot map text 511 512 void maptex( PLMAPFORM_callback mapform, 513 const char *name, PLFLT dx, PLFLT dy, PLFLT just, const char *text, 514 PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, 515 PLINT plotentry ); 516 517 // Plot map fills 518 519 void mapfill( PLMAPFORM_callback mapform, 520 const char *name, PLFLT minx, PLFLT maxx, PLFLT miny, 521 PLFLT maxy, const PLINT *plotentries, PLINT nplotentries ); 522 523 // Plot the latitudes and longitudes on the background. 524 525 void meridians( PLMAPFORM_callback mapform, 526 PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, 527 PLFLT minlat, PLFLT maxlat ); 528 529 // Plots a mesh representation of the function z[x][y]. 530 531 void mesh( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt ); 532 533 // Plots a mesh representation of the function z[x][y] with contour. 534 535 void meshc( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, 536 const PLFLT *clevel, PLINT nlevel ); 537 538 // Creates a new stream and makes it the default. 539 540 // void 541 // mkstrm(PLINT *p_strm); 542 543 // Prints out "text" at specified position relative to viewport 544 545 void mtex( const char *side, PLFLT disp, PLFLT pos, PLFLT just, 546 const char *text ); 547 548 // Prints out "text" at specified position relative to viewport (3D) 549 550 void mtex3( const char *side, PLFLT disp, PLFLT pos, PLFLT just, 551 const char *text ); 552 553 // Plots a 3-d representation of the function z[x][y]. 554 555 void plot3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, 556 PLINT nx, PLINT ny, PLINT opt, bool side ); 557 558 // Plots a 3-d representation of the function z[x][y] with contour. 559 560 void plot3dc( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, 561 PLINT nx, PLINT ny, PLINT opt, 562 const PLFLT *clevel, PLINT nlevel ); 563 564 // Plots a 3-d representation of the function z[x][y] with contour 565 // and y index limits. 566 567 void plot3dcl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, 568 PLINT nx, PLINT ny, PLINT opt, 569 const PLFLT *clevel, PLINT nlevel, 570 PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax ); 571 572 573 // Plots a 3-d shaded representation of the function z[x][y]. 574 575 void surf3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, 576 PLINT nx, PLINT ny, PLINT opt, 577 const PLFLT *clevel, PLINT nlevel ); 578 579 // Plots a 3-d shaded representation of the function z[x][y] with y 580 // index limits 581 582 void surf3dl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, 583 PLINT nx, PLINT ny, PLINT opt, 584 const PLFLT *clevel, PLINT nlevel, 585 PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax ); 586 587 588 // Process options list using current options info. 589 590 PLINT parseopts( int *p_argc, char **argv, PLINT mode ); 591 592 // Set fill pattern directly. 593 594 void pat( PLINT nlin, const PLINT *inc, const PLINT *del ); 595 596 // Draw a line connecting two points, accounting for coordinate transforms 597 598 void path( PLINT n, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 ); 599 600 // Plots array y against x for n points using ASCII code "code". 601 602 void poin( PLINT n, const PLFLT *x, const PLFLT *y, PLINT code ); 603 604 // Draws a series of points in 3 space. 605 606 void poin3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT code ); 607 608 // Draws a polygon in 3 space. 609 610 void poly3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const bool *draw, bool ifcc ); 611 612 // Set the floating point precision (in number of places) in numeric labels. 613 614 void prec( PLINT setp, PLINT prec ); 615 616 // Set fill pattern, using one of the predefined patterns. 617 618 void psty( PLINT patt ); 619 620 // Prints out "text" at world cooordinate (x,y). 621 622 void ptex( PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, 623 const char *text ); 624 625 // Prints out "text" at world cooordinate (x,y,z). 626 627 void ptex3( PLFLT wx, PLFLT wy, PLFLT wz, PLFLT dx, PLFLT dy, PLFLT dz, 628 PLFLT sx, PLFLT sy, PLFLT sz, PLFLT just, const char *text ); 629 630 // Get the world coordinates associated with device coordinates 631 632 PLINT translatecursor( PLGraphicsIn *gin ); 633 634 // Replays contents of plot buffer to current device/file. 635 636 void replot( void ); 637 638 // Set character height. 639 640 void schr( PLFLT def, PLFLT scale ); 641 642 // Set number of colors in cmap 0 643 644 void scmap0n( PLINT ncol0 ); 645 646 // Set number of colors in cmap 1 647 648 void scmap1n( PLINT ncol1 ); 649 650 // Set the color map 1 range used in continuous plots 651 652 void scmap1_range( PLFLT min_color, PLFLT max_color ); 653 654 // Get the color map 1 range used in continuous plots 655 656 void gcmap1_range( PLFLT &min_color, PLFLT &max_color ); 657 658 // Set color map 0 colors by 8 bit RGB values 659 660 void scmap0( const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol0 ); 661 662 // Set color map 0 colors by 8 bit RGB values and alpha value (0.0-1.0) 663 664 void scmap0a( const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *a, PLINT ncol0 ); 665 666 // Set color map 1 colors by 8 bit RGB values 667 668 void scmap1( const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol1 ); 669 670 // Set color map 1 colors by 8 bit RGB values and alpha value (0.0-1.0) 671 672 void scmap1a( const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *a, PLINT ncol1 ); 673 674 // Set color map 1 colors using a piece-wise linear relationship between 675 // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. 676 677 void scmap1l( bool itype, PLINT npts, const PLFLT *intensity, 678 const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const bool *alt_hue_path = NULL ); 679 680 // void scmap1l( bool itype, PLINT npts, PLFLT *intensity, 681 // PLFLT *coord1, PLFLT *coord2, PLFLT *coord3 ); 682 683 // Set color map 1 colors using a piece-wise linear relationship between 684 // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. 685 // Include alpha value in range 0.0-1.0. 686 687 void scmap1la( bool itype, PLINT npts, const PLFLT *intensity, 688 const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *a, 689 const bool *alt_hue_path = NULL ); 690 691 // Set a given color from color map 0 by 8 bit RGB value 692 693 void scol0( PLINT icol0, PLINT r, PLINT g, PLINT b ); 694 695 // Set a given color from color map 0 by 8 bit RGB value and alpha value (0.0-1.0) 696 697 void scol0a( PLINT icol0, PLINT r, PLINT g, PLINT b, PLFLT a ); 698 699 // Set the background color by 8 bit RGB value 700 701 void scolbg( PLINT r, PLINT g, PLINT b ); 702 703 // Set the background color by 8 bit RGB + alpha value 704 705 void scolbga( PLINT r, PLINT g, PLINT b, PLFLT a ); 706 707 // Used to globally turn color output on/off 708 709 void scolor( PLINT color ); 710 711 // Set the compression level 712 713 void scompression( PLINT compression ); 714 715 // Set the device (keyword) name 716 717 void sdev( const char *devname ); 718 719 // Get the device (keyword) name 720 721 void gdev( char *devname ); 722 723 // Set window into device space using margin, aspect ratio, and 724 // justification 725 726 void sdidev( PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy ); 727 728 // Set up transformation from metafile coordinates. 729 730 void sdimap( PLINT dimxmin, PLINT dimxmax, 731 PLINT dimymin, PLINT dimymax, 732 PLFLT dimxpmm, PLFLT dimypmm ); 733 734 // Set plot orientation, specifying rotation in units of pi/2. 735 736 void sdiori( PLFLT rot ); 737 738 // Set window into plot space 739 740 void sdiplt( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax ); 741 742 // Set window into plot space incrementally (zoom) 743 744 void sdiplz( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax ); 745 746 // Set the escape character for text strings. 747 748 void sesc( char esc ); 749 750 // Set offset and spacing of contour labels 751 752 void setcontlabelparam( PLFLT offset, PLFLT size, PLFLT spacing, 753 PLINT active ); 754 755 // Set the format of the contour labels 756 757 void setcontlabelformat( PLINT lexp, PLINT sigdig ); 758 759 // Set family file parameters 760 761 void sfam( PLINT fam, PLINT num, PLINT bmax ); 762 763 // Set FCI (font characterization integer) 764 765 void sfci( PLUNICODE fci ); 766 767 // Set the output file name. 768 769 void sfnam( const char *fnam ); 770 771 // Set the pointer to the data used in driver initialisation 772 773 void sdevdata( void *data ); 774 775 // Set the current font family, style and weight 776 777 void sfont( PLINT family, PLINT style, PLINT weight ); 778 779 // Shade region. 780 781 void shade( const PLFLT * const *a, PLINT nx, PLINT ny, 782 PLDEFINED_callback defined, 783 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, 784 PLFLT shade_min, PLFLT shade_max, 785 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 786 PLINT min_color, PLFLT min_width, 787 PLINT max_color, PLFLT max_width, 788 PLFILL_callback fill, bool rectangular, 789 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 790 791 void shades( const PLFLT * const *a, PLINT nx, PLINT ny, 792 PLDEFINED_callback defined, 793 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 794 const PLFLT * clevel, PLINT nlevel, PLFLT fill_width, 795 PLINT cont_color, PLFLT cont_width, 796 PLFILL_callback fill, bool rectangular, 797 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 798 799 // Would be nice to fix this even more, say by stuffing xmin, xmax, 800 // ymin, ymax, rectangular, and pcxf all into the contourable data 801 // class. Have to think more on that. Or maybe the coordinate info. 802 803 void shade( Contourable_Data& d, PLFLT xmin, PLFLT xmax, 804 PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, 805 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 806 PLINT min_color, PLFLT min_width, 807 PLINT max_color, PLFLT max_width, 808 bool rectangular, 809 Coord_Xformer *pcxf ); 810 811 #ifdef PL_DEPRECATED 812 void shade1( const PLFLT * a, PLINT nx, PLINT ny, 813 PLDEFINED_callback defined, 814 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, 815 PLFLT shade_min, PLFLT shade_max, 816 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 817 PLINT min_color, PLFLT min_width, 818 PLINT max_color, PLFLT max_width, 819 PLFILL_callback fill, bool rectangular, 820 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 821 822 void shade1( const PLFLT * a, PLINT nx, PLINT ny, 823 PLDEFINED_callback defined, 824 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, 825 PLFLT shade_min, PLFLT shade_max, 826 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 827 PLINT min_color, PLFLT min_width, 828 PLINT max_color, PLFLT max_width, 829 PLFILL_callback fill, PLINT rectangular, 830 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 831 832 #endif //PL_DEPRECATED 833 void fshade( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), 834 PLPointer f2eval_data, 835 PLFLT ( *c2eval )( PLINT, PLINT, PLPointer ), 836 PLPointer c2eval_data, 837 PLINT nx, PLINT ny, 838 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, 839 PLFLT shade_min, PLFLT shade_max, 840 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 841 PLINT min_color, PLFLT min_width, 842 PLINT max_color, PLFLT max_width, 843 PLFILL_callback fill, bool rectangular, 844 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 845 846 // Setup a user-provided custom labeling function 847 848 void slabelfunc( PLLABEL_FUNC_callback label_func, PLPointer label_data ); 849 850 // Set up lengths of major tick marks. 851 852 void smaj( PLFLT def, PLFLT scale ); 853 854 // Set the RGB memory area to be plotted (with the 'mem' or 'memcairo' drivers) 855 856 void smem( PLINT maxx, PLINT maxy, void *plotmem ); 857 858 // Set the RGBA memory area to be plotted (with the 'memcairo' driver) 859 860 void smema( PLINT maxx, PLINT maxy, void *plotmem ); 861 862 // Set up lengths of minor tick marks. 863 864 void smin( PLFLT def, PLFLT scale ); 865 866 // Set orientation. Must be done before calling plinit. 867 868 void sori( PLINT ori ); 869 870 // Set output device parameters. Usually ignored by the driver. 871 872 void spage( PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, 873 PLINT xoff, PLINT yoff ); 874 875 // Set the pause (on end-of-page) status 876 877 void spause( bool pause ); 878 879 // Set the colors for color table 0 from a cmap0 file 880 881 void spal0( const char *filename ); 882 883 // Set the colors for color table 1 from a cmap1 file 884 885 void spal1( const char *filename, bool interpolate = true ); 886 887 // Set stream number. 888 889 void sstrm( PLINT strm ); 890 891 // Set the number of subwindows in x and y 892 893 void ssub( PLINT nx, PLINT ny ); 894 895 // Set symbol height. 896 897 void ssym( PLFLT def, PLFLT scale ); 898 899 // Initialize PLplot, passing in the windows/page settings. 900 901 void star( PLINT nx, PLINT ny ); 902 903 // Initialize PLplot, passing the device name and windows/page settings. 904 905 void start( const char *devname, PLINT nx, PLINT ny ); 906 907 // Set the coordinate transform 908 909 void stransform( PLTRANSFORM_callback coordinate_transform, PLPointer coordinate_transform_data ); 910 911 // Prints out the same string repeatedly at the n points in world 912 // coordinates given by the x and y arrays. Supersedes plpoin and 913 // plsymbol for the case where text refers to a unicode glyph either 914 // directly as UTF-8 or indirectly via the standard text escape 915 // sequences allowed for PLplot input strings. 916 917 void string( PLINT n, const PLFLT *x, const PLFLT *y, const char *string ); 918 919 // Prints out the same string repeatedly at the n points in world 920 // coordinates given by the x, y, and z arrays. Supersedes plpoin3 921 // for the case where text refers to a unicode glyph either directly 922 // as UTF-8 or indirectly via the standard text escape sequences 923 // allowed for PLplot input strings. 924 925 void string3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const char *string ); 926 927 // Create 1d stripchart 928 929 void stripc( PLINT *id, const char *xspec, const char *yspec, 930 PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, 931 PLFLT xlpos, PLFLT ylpos, 932 bool y_ascl, bool acc, 933 PLINT colbox, PLINT collab, 934 const PLINT colline[], const PLINT styline[], const char *legline[], 935 const char *labx, const char *laby, const char *labtop ); 936 937 // Add a point to a stripchart. 938 939 void stripa( PLINT id, PLINT pen, PLFLT x, PLFLT y ); 940 941 // Deletes and releases memory used by a stripchart. 942 943 void stripd( PLINT id ); 944 945 // plots a 2d image (or a matrix too large for plshade() ) - colors 946 // automatically scaled 947 948 void image( const PLFLT * const *data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, 949 PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, 950 PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax ); 951 952 // plots a 2d image (or a matrix too large for plshade() ) 953 954 void imagefr( const PLFLT * const *data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, 955 PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, 956 PLFLT valuemin, PLFLT valuemax, 957 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 958 959 // Set up a new line style 960 961 void styl( PLINT nms, const PLINT *mark, const PLINT *space ); 962 963 // Sets the edges of the viewport to the specified absolute coordinates 964 965 void svpa( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); 966 967 // Set x axis labeling parameters 968 969 void sxax( PLINT digmax, PLINT digits ); 970 971 // Set inferior X window 972 973 void sxwin( PLINT window_id ); 974 975 // Set y axis labeling parameters 976 977 void syax( PLINT digmax, PLINT digits ); 978 979 // Plots array y against x for n points using Hershey symbol "code" 980 981 void sym( PLINT n, const PLFLT *x, const PLFLT *y, PLINT code ); 982 983 // Set z axis labeling parameters 984 985 void szax( PLINT digmax, PLINT digits ); 986 987 // Switches to text screen. 988 989 void text( void ); 990 991 // Set the format for date / time labels 992 993 void timefmt( const char *fmt ); 994 995 // Sets the edges of the viewport with the given aspect ratio, leaving 996 // room for labels. 997 998 void vasp( PLFLT aspect ); 999 1000 // Creates the largest viewport of the specified aspect ratio that fits 1001 // within the specified normalized subpage coordinates. 1002 1003 void vpas( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect ); 1004 1005 // Creates a viewport with the specified normalized subpage coordinates. 1006 1007 void vpor( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); 1008 1009 // Defines a "standard" viewport with seven character heights for 1010 // the left margin and four character heights everywhere else. 1011 1012 void vsta( void ); 1013 1014 // Set up a window for three-dimensional plotting. 1015 1016 void w3d( PLFLT basex, PLFLT basey, PLFLT height, PLFLT xmin0, 1017 PLFLT xmax0, PLFLT ymin0, PLFLT ymax0, PLFLT zmin0, 1018 PLFLT zmax0, PLFLT alt, PLFLT az ); 1019 1020 // Set pen width. 1021 1022 void width( PLFLT width ); 1023 1024 // Set up world coordinates of the viewport boundaries (2d plots). 1025 1026 void wind( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); 1027 1028 // Set xor mode; mode = 1-enter, 0-leave, status = 0 if not interactive device 1029 void xormod( bool mode, bool *status ); 1030 1031 // Random number generator based on Mersenne Twister. 1032 // Functions to set seed and obtain real random numbers in the range [0,1]. 1033 1034 void seed( unsigned int s ); 1035 1036 PLFLT randd( void ); 1037 1038 1039 // The rest for use from C only 1040 1041 // Returns a list of file-oriented device names and their menu strings 1042 1043 void gFileDevs( const char ***p_menustr, const char ***p_devname, 1044 int *p_ndev ); 1045 1046 // Set the function pointer for the keyboard event handler 1047 1048 void sKeyEH( void ( *KeyEH )( PLGraphicsIn *, void *, int * ), 1049 void *KeyEH_data ); 1050 1051 // Sets an optional user bop handler 1052 1053 void sbopH( void ( *handler )( void *, int * ), void *handlier_data ); 1054 1055 // Sets an optional user eop handler 1056 1057 void seopH( void ( *handler )( void *, int * ), void *handlier_data ); 1058 1059 // Set the variables to be used for storing error info 1060 1061 void sError( PLINT *errcode, char *errmsg ); 1062 1063 // Sets an optional user exit handler. 1064 1065 void sexit( int ( *handler )( const char * ) ); 1066 1067 // Transformation routines 1068 1069 // Identity transformation. 1070 1071 //static void tr0( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 1072 1073 // Does linear interpolation from singly dimensioned coord arrays. 1074 1075 //static void tr1( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 1076 1077 // Does linear interpolation from doubly dimensioned coord arrays 1078 // (column dominant, as per normal C 2d arrays). 1079 1080 //static void tr2( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 1081 1082 // Just like pltr2() but uses pointer arithmetic to get coordinates from 1083 // 2d grid tables. 1084 1085 //static void tr2p( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ); 1086 1087 // We obviously won't be using this object from Fortran... 1088 1089 // Identity transformation for plots from Fortran. 1090 1091 // void tr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ); 1092 1093 // Does linear interpolation from doubly dimensioned coord arrays 1094 // (row dominant, i.e. Fortran ordering). 1095 1096 // void tr2f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ); 1097 1098 // Example linear transformation function for contour plotter. 1099 // This is not actually part of the core library any more 1100 //void xform( PLFLT x, PLFLT y, PLFLT * tx, PLFLT * ty ); 1101 1102 // Function evaluators 1103 1104 // Does a lookup from a 2d function array. Array is of type (PLFLT **), 1105 // and is column dominant (normal C ordering). 1106 1107 PLFLT f2eval2( PLINT ix, PLINT iy, PLPointer plf2eval_data ); 1108 1109 // Does a lookup from a 2d function array. Array is of type (PLFLT *), 1110 // and is column dominant (normal C ordering). 1111 1112 PLFLT f2eval( PLINT ix, PLINT iy, PLPointer plf2eval_data ); 1113 1114 // Does a lookup from a 2d function array. Array is of type (PLFLT *), 1115 // and is row dominant (Fortran ordering). 1116 1117 PLFLT f2evalr( PLINT ix, PLINT iy, PLPointer plf2eval_data ); 1118 1119 // Command line parsing utilities 1120 1121 // Clear internal option table info structure. 1122 1123 void ClearOpts( void ); 1124 1125 // Reset internal option table info structure. 1126 1127 void ResetOpts( void ); 1128 1129 // Merge user option table into internal info structure. 1130 1131 PLINT MergeOpts( PLOptionTable *options, const char *name, const char **notes ); 1132 1133 // Set the strings used in usage and syntax messages. 1134 1135 void SetUsage( char *program_string, char *usage_string ); 1136 1137 // Process input strings, treating them as an option and argument pair. 1138 1139 PLINT setopt( const char *opt, const char *optarg ); 1140 1141 // This version is for backward compatibility only - don't use in new code 1142 1143 int SetOpt( const char *opt, const char *optarg ); 1144 1145 // Print usage & syntax message. 1146 1147 void OptUsage( void ); 1148 1149 // Miscellaneous 1150 1151 // Set the output file pointer 1152 1153 void gfile( FILE **p_file ); 1154 1155 // Get the output file pointer 1156 1157 void sfile( FILE *file ); 1158 1159 // Get the escape character for text strings. 1160 1161 void gesc( char *p_esc ); 1162 1163 // Front-end to driver escape function. 1164 1165 void cmd( PLINT op, void *ptr ); 1166 1167 // Return full pathname for given file if executable 1168 1169 PLINT FindName( char *p ); 1170 1171 // Looks for the specified executable file according to usual search path. 1172 1173 char *FindCommand( char *fn ); 1174 1175 // Gets search name for file by concatenating the dir, subdir, and file 1176 // name, allocating memory as needed. 1177 1178 void GetName( char *dir, char *subdir, char *filename, char **filespec ); 1179 1180 // Prompts human to input an integer in response to given message. 1181 1182 PLINT GetInt( char *s ); 1183 1184 // Prompts human to input a float in response to given message. 1185 1186 PLFLT GetFlt( char *s ); 1187 1188 // Determine the Iliffe column vector of pointers to PLFLT row 1189 // vectors corresponding to a 2D matrix of PLFLT's that is statically 1190 // allocated. 1191 1192 void Static2dGrid( PLFLT_NC_MATRIX zIliffe, PLFLT_VECTOR zStatic, PLINT nx, PLINT ny ); 1193 1194 // Allocate a block of memory for use as a 2-d grid of PLFLT's organized 1195 // as an Iliffe column vector of pointers to PLFLT row vectors. 1196 1197 void Alloc2dGrid( PLFLT_NC_MATRIX *f, PLINT nx, PLINT ny ); 1198 1199 // Frees a block of memory allocated with plAlloc2dGrid(). 1200 1201 void Free2dGrid( PLFLT **f, PLINT nx, PLINT ny ); 1202 1203 // Find the maximum and minimum of a 2d matrix allocated with plAllc2dGrid(). 1204 void MinMax2dGrid( PLFLT_MATRIX f, PLINT nx, PLINT ny, PLFLT *fmax, PLFLT *fmin ); 1205 1206 // Functions for converting between HLS and RGB color space 1207 1208 void hlsrgb( PLFLT h, PLFLT l, PLFLT s, 1209 PLFLT *p_r, PLFLT *p_g, PLFLT *p_b ); 1210 1211 void rgbhls( PLFLT r, PLFLT g, PLFLT b, 1212 PLFLT *p_h, PLFLT *p_l, PLFLT *p_s ); 1213 1214 // Wait for graphics input event and translate to world coordinates 1215 1216 PLINT GetCursor( PLGraphicsIn *plg ); 1217 1218 #ifdef PL_DEPRECATED 1219 // Deprecated versions of methods which use PLINT instead of bool 1220 void svect( const PLFLT *arrow_x, const PLFLT *arrow_y, PLINT npts, PLINT fill ); 1221 void cpstrm( plstream &pls, PLINT flags ); 1222 void plot3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, 1223 PLINT nx, PLINT ny, PLINT opt, PLINT side ); 1224 void poly3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const PLINT *draw, PLINT ifcc ); 1225 void scmap1l( PLINT itype, PLINT npts, const PLFLT *intensity, 1226 const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLINT *alt_hue_path ); 1227 1228 void shade( const PLFLT * const *a, PLINT nx, PLINT ny, 1229 PLDEFINED_callback defined, 1230 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, 1231 PLFLT shade_min, PLFLT shade_max, 1232 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 1233 PLINT min_color, PLFLT min_width, 1234 PLINT max_color, PLFLT max_width, 1235 PLFILL_callback fill, PLINT rectangular, 1236 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 1237 1238 void shades( const PLFLT * const *a, PLINT nx, PLINT ny, PLDEFINED_callback defined, 1239 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, 1240 const PLFLT * clevel, PLINT nlevel, PLFLT fill_width, 1241 PLINT cont_color, PLFLT cont_width, 1242 PLFILL_callback fill, PLINT rectangular, 1243 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 1244 1245 void shade( Contourable_Data& d, PLFLT xmin, PLFLT xmax, 1246 PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, 1247 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 1248 PLINT min_color, PLFLT min_width, 1249 PLINT max_color, PLFLT max_width, 1250 PLINT rectangular, 1251 Coord_Xformer *pcxf ); 1252 1253 void fshade( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), 1254 PLPointer f2eval_data, 1255 PLFLT ( *c2eval )( PLINT, PLINT, PLPointer ), 1256 PLPointer c2eval_data, 1257 PLINT nx, PLINT ny, 1258 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, 1259 PLFLT shade_min, PLFLT shade_max, 1260 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, 1261 PLINT min_color, PLFLT min_width, 1262 PLINT max_color, PLFLT max_width, 1263 PLFILL_callback fill, PLINT rectangular, 1264 PLTRANSFORM_callback pltr, PLPointer pltr_data ); 1265 1266 void spause( PLINT pause ); 1267 1268 void stripc( PLINT *id, const char *xspec, const char *yspec, 1269 PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, 1270 PLFLT xlpos, PLFLT ylpos, 1271 PLINT y_ascl, PLINT acc, 1272 PLINT colbox, PLINT collab, 1273 const PLINT colline[], const PLINT styline[], const char *legline[], 1274 const char *labx, const char *laby, const char *labtop ); 1275 1276 void xormod( PLINT mode, PLINT *status ); 1277 #endif //PL_DEPRECATED 1278 }; 1279 1280 1281 1282 #endif // __plstream_h__ 1283 1284 //-------------------------------------------------------------------------- 1285 // end of plstream.h 1286 //-------------------------------------------------------------------------- 1287