PLplot 5.15.0
Loading...
Searching...
No Matches
plstream.cc
Go to the documentation of this file.
1//----------------------------------*-C++-*----------------------------------//
2//
3// Copyright (C) 1995 Geoffrey Furnish
4// Copyright (C) 1995-2002 Maurice LeBrun
5// Copyright (C) 2000-2018 Alan W. Irwin
6// Copyright (C) 2003 Joao Cardoso
7// Copyright (C) 2003-2013 Andrew Ross
8// Copyright (C) 2004-2005 Rafael Laboissiere
9// Copyright (C) 2006-2008 Werner Smekal
10// Copyright (C) 2009 Hazen Babcock
11// Copyright (C) 2010-2011 Hezekiah M. Carty
12// Copyright (C) 2014-2015 Phil Rosenberg
13//
14// This file is part of PLplot.
15//
16// PLplot is free software; you can redistribute it and/or modify
17// it under the terms of the GNU Library General Public License as published
18// by the Free Software Foundation; either version 2 of the License, or
19// (at your option) any later version.
20//
21// PLplot is distributed in the hope that it will be useful,
22// but WITHOUT ANY WARRANTY; without even the implied warranty of
23// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24// GNU Library General Public License for more details.
25//
26// You should have received a copy of the GNU Library General Public License
27// along with PLplot; if not, write to the Free Software
28// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29
30//--------------------------------------------------------------------------
31// @> Source file plstream.
32//--------------------------------------------------------------------------
33
34#include "plplot.h"
35#include "plstream.h"
36
37#include <iostream>
38
39#ifdef PL_USE_NAMESPACE
40using namespace std;
41#endif
42
44{
45 const Contourable_Data& d = *(Contourable_Data *) p;
46
47 return d( i, j );
48}
49
51 PLFLT *nx, PLFLT *ny, PLPointer p )
52{
53 const Coord_Xformer& xf = *(Coord_Xformer *) p;
54
55 xf.xform( ox, oy, *nx, *ny );
56}
57
58// A specific case for handling transformation defined by 2-d grid vertex
59// specification matrices.
60
62 : xg( cx ), yg( cy )
63{
64}
65
66// Next routine copied and modified for C++ from PLPLOT 4.99d.
67
68//--------------------------------------------------------------------------
69// pltr2()
70//
71// Does linear interpolation from doubly dimensioned coord arrays
72// (column dominant, as per normal C 2d arrays).
73//
74// This routine includes lots of checks for out of bounds. This would
75// occur occasionally due to some bugs in the contour plotter (now fixed).
76// If an out of bounds coordinate is obtained, the boundary value is provided
77// along with a warning. These checks should stay since no harm is done if
78// if everything works correctly.
79//--------------------------------------------------------------------------
80
81void cxx_pltr2::xform( PLFLT x, PLFLT y, PLFLT& tx, PLFLT& ty ) const
82{
83 int nx, ny;
84 xg.elements( nx, ny );
85
86 int ul, ur, vl, vr;
87 PLFLT du, dv;
88
89 PLFLT xll, xlr, xrl, xrr;
90 PLFLT yll, ylr, yrl, yrr;
91 PLFLT xmin, xmax, ymin, ymax;
92
93 ul = (int) x;
94 ur = ul + 1;
95 du = x - ul;
96
97 vl = (int) y;
98 vr = vl + 1;
99 dv = y - vl;
100
101 xmin = 0;
102 xmax = nx - 1;
103 ymin = 0;
104 ymax = ny - 1;
105
106 if ( x < xmin || x > xmax || y < ymin || y > ymax )
107 {
108 cerr << "cxx_pltr2::xform, Invalid coordinates\n";
109
110 if ( x < xmin )
111 {
112 if ( y < ymin )
113 {
114 tx = xg( 0, 0 );
115 ty = yg( 0, 0 );
116 }
117 else if ( y > ymax )
118 {
119 tx = xg( 0, ny - 1 );
120 ty = yg( 0, ny - 1 );
121 }
122 else
123 {
124 xll = xg( 0, vl );
125 yll = yg( 0, vl );
126 xlr = xg( 0, vr );
127 ylr = yg( 0, vr );
128
129 tx = xll * ( 1 - dv ) + xlr * ( dv );
130 ty = yll * ( 1 - dv ) + ylr * ( dv );
131 }
132 }
133 else if ( x > xmax )
134 {
135 if ( y < ymin )
136 {
137 tx = xg( nx - 1, 0 );
138 ty = yg( nx - 1, 0 );
139 }
140 else if ( y > ymax )
141 {
142 tx = xg( nx - 1, ny - 1 );
143 ty = yg( nx - 1, ny - 1 );
144 }
145 else
146 {
147 xll = xg( nx - 1, vl );
148 yll = yg( nx - 1, vl );
149 xlr = xg( nx - 1, vr );
150 ylr = yg( nx - 1, vr );
151
152 tx = xll * ( 1 - dv ) + xlr * ( dv );
153 ty = yll * ( 1 - dv ) + ylr * ( dv );
154 }
155 }
156 else
157 {
158 if ( y < ymin )
159 {
160 xll = xg( ul, 0 );
161 xrl = xg( ur, 0 );
162 yll = yg( ul, 0 );
163 yrl = yg( ur, 0 );
164
165 tx = xll * ( 1 - du ) + xrl * ( du );
166 ty = yll * ( 1 - du ) + yrl * ( du );
167 }
168 else if ( y > ymax )
169 {
170 xlr = xg( ul, ny - 1 );
171 xrr = xg( ur, ny - 1 );
172 ylr = yg( ul, ny - 1 );
173 yrr = yg( ur, ny - 1 );
174
175 tx = xlr * ( 1 - du ) + xrr * ( du );
176 ty = ylr * ( 1 - du ) + yrr * ( du );
177 }
178 }
179 }
180
181// Normal case.
182// Look up coordinates in row-dominant array.
183// Have to handle right boundary specially -- if at the edge, we'd
184// better not reference the out of bounds point.
185
186 else
187 {
188 xll = xg( ul, vl );
189 yll = yg( ul, vl );
190
191// ur is out of bounds
192
193 if ( ur == nx && vr < ny )
194 {
195 xlr = xg( ul, vr );
196 ylr = yg( ul, vr );
197
198 tx = xll * ( 1 - dv ) + xlr * ( dv );
199 ty = yll * ( 1 - dv ) + ylr * ( dv );
200 }
201
202// vr is out of bounds
203
204 else if ( ur < nx && vr == ny )
205 {
206 xrl = xg( ur, vl );
207 yrl = yg( ur, vl );
208
209 tx = xll * ( 1 - du ) + xrl * ( du );
210 ty = yll * ( 1 - du ) + yrl * ( du );
211 }
212
213// both ur and vr are out of bounds
214
215 else if ( ur == nx && vr == ny )
216 {
217 tx = xll;
218 ty = yll;
219 }
220
221// everything in bounds
222
223 else
224 {
225 xrl = xg( ur, vl );
226 xlr = xg( ul, vr );
227 xrr = xg( ur, vr );
228
229 yrl = yg( ur, vl );
230 ylr = yg( ul, vr );
231 yrr = yg( ur, vr );
232
233 tx = xll * ( 1 - du ) * ( 1 - dv ) + xlr * ( 1 - du ) * ( dv ) +
234 xrl * ( du ) * ( 1 - dv ) + xrr * ( du ) * ( dv );
235
236 ty = yll * ( 1 - du ) * ( 1 - dv ) + ylr * ( 1 - du ) * ( dv ) +
237 yrl * ( du ) * ( 1 - dv ) + yrr * ( du ) * ( dv );
238 }
239 }
240}
241
242//Callbacks
243
244// Callback for plfill. This will just call the C plfill function
245
246void plcallback::fill( PLINT n, const PLFLT *x, const PLFLT *y )
247{
248 plfill( n, x, y );
249}
250
251// Transformation routines
252
253// Identity transformation.
254
255void plcallback::tr0( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty,
256 PLPointer pltr_data )
257{
258 pltr0( x, y, tx, ty, pltr_data );
259}
260
261// Does linear interpolation from singly dimensioned coord arrays.
262
263void plcallback::tr1( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty,
264 PLPointer pltr_data )
265{
266 pltr1( x, y, tx, ty, pltr_data );
267}
268
269// Does linear interpolation from doubly dimensioned coord arrays
270// (column dominant, as per normal C 2d arrays).
271
272void plcallback::tr2( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty,
273 PLPointer pltr_data )
274{
275 pltr2( x, y, tx, ty, pltr_data );
276}
277
278// Just like pltr2() but uses pointer arithmetic to get coordinates from
279// 2d grid tables.
280
282 PLPointer pltr_data )
283{
284 pltr2p( x, y, tx, ty, pltr_data );
285}
286
288
290{
292 //::c_plinit();
294}
295
297{
298 switch ( sid )
299 {
300 case PLS::Next:
301// throw( "plstream ctor option not implemented." );
302 break;
303
304 case PLS::Current:
306 break;
307
308 case PLS::Specific:
309 stream = strm;
310 break;
311
312 default:
313// throw( "plstream ctor option not implemented." );
314 break;
315 }
316}
317
318plstream::plstream( PLINT nx, PLINT ny, const char *driver, const char *file )
319{
321
322 if ( driver )
323 ::c_plsdev( driver );
324 if ( file )
325 ::c_plsfnam( file );
326 ::c_plssub( nx, ny );
327 //::c_plinit();
328
330}
331
333 const char *driver, const char *file )
334{
336
337 if ( driver )
338 ::c_plsdev( driver );
339 if ( file )
340 ::c_plsfnam( file );
341 ::c_plssub( nx, ny );
342 ::c_plscolbg( r, g, b );
343 //::c_plinit();
344
346}
347
349{
351 ::c_plend1();
352
354 if ( !active_streams )
355 ::c_plend();
356}
357
358#define BONZAI { throw "plstream method not implemented."; }
359
360// C routines callable from stub routines come first
361
362// Advance to subpage "page", or to the next one if "page" = 0.
363
364void
366{
367 set_stream();
368
369 pladv( page );
370}
371
372void
373plstream::arc( PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2,
374 PLFLT rotate, PLBOOL fill )
375{
376 set_stream();
377
378 plarc( x, y, a, b, angle1, angle2, rotate, fill );
379}
380
381void
382plstream::vect( const PLFLT * const *u, const PLFLT * const *v, PLINT nx, PLINT ny, PLFLT scale,
383 PLTRANSFORM_callback pltr, PLPointer pltr_data )
384{
385 set_stream();
386
387 plvect( u, v, nx, ny, scale, pltr, pltr_data );
388}
389
390void
391plstream::svect( const PLFLT *arrow_x, const PLFLT *arrow_y, PLINT npts, bool fill )
392{
393 set_stream();
394
395 plsvect( arrow_x, arrow_y, npts, (PLBOOL) fill );
396}
397
398// This functions similarly to plbox() except that the origin of the axes is
399// placed at the user-specified point (x0, y0).
400
401void
402plstream::axes( PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub,
403 const char *yopt, PLFLT ytick, PLINT nysub )
404{
405 set_stream();
406
407 plaxes( x0, y0, xopt, xtick, nxsub, yopt, ytick, nysub );
408}
409
410// Plot a histogram using x to store data values and y to store frequencies.
411
412void plstream::bin( PLINT nbin, const PLFLT *x, const PLFLT *y, PLINT center )
413{
414 set_stream();
415
416 plbin( nbin, x, y, center );
417}
418
419// Start new page. Should only be used with pleop().
420
422{
423 set_stream();
424
425 plbop();
426}
427
428// This draws a box around the current viewport.
429
430void plstream::box( const char *xopt, PLFLT xtick, PLINT nxsub,
431 const char *yopt, PLFLT ytick, PLINT nysub )
432{
433 set_stream();
434
435 plbox( xopt, xtick, nxsub, yopt, ytick, nysub );
436}
437
438
439// This is the 3-d analogue of plbox().
440
441void
442plstream::box3( const char *xopt, const char *xlabel, PLFLT xtick, PLINT nsubx,
443 const char *yopt, const char *ylabel, PLFLT ytick, PLINT nsuby,
444 const char *zopt, const char *zlabel, PLFLT ztick, PLINT nsubz )
445{
446 set_stream();
447
448 plbox3( xopt, xlabel, xtick, nsubx,
449 yopt, ylabel, ytick, nsuby,
450 zopt, zlabel, ztick, nsubz );
451}
452
453// Calculate broken-down time from continuous time for current stream.
454void plstream::btime( PLINT & year, PLINT & month, PLINT & day, PLINT & hour,
455 PLINT & min, PLFLT & sec, PLFLT ctime )
456{
457 set_stream();
458
459 plbtime( &year, &month, &day, &hour, &min, &sec, ctime );
460}
461
462// Calculate world coordinates and subpage from relative device coordinates.
463
464void plstream::calc_world( PLFLT rx, PLFLT ry, PLFLT & wx, PLFLT & wy,
465 PLINT & window )
466{
467 set_stream();
468
469 plcalc_world( rx, ry, &wx, &wy, &window );
470}
471
472// Clear the current subpage.
473
475{
476 set_stream();
477
478 plclear();
479}
480
481// Set color, map 0. Argument is integer between 0 and 15.
482
484{
485 set_stream();
486
487 plcol0( icol0 );
488}
489
490// Set the color using a descriptive name. Replaces plcol0().
491
493{
494 set_stream();
495
496 plcol0( (int) c );
497}
498
499// Set color, map 1. Argument is a float between 0. and 1.
500
502{
503 set_stream();
504
505 plcol1( c );
506}
507
508#ifdef PL_DEPRECATED
509// Old (incorrect) version retained only for compatibility
510void plstream::col( PLFLT c )
511{
512 set_stream();
513
514 cerr <<
515 "plstream::col(PLFLT c) : function deprecated. Use plstream::col1(PLFLT c) instead"
516 << endl;
517
518 plcol1( c );
519}
520#endif //PL_DEPRECATED
521
522// Configure transformation between continuous and broken-down time (and
523// vice versa) for current stream.
524void plstream::configtime( PLFLT scale, PLFLT offset1, PLFLT offset2,
525 PLINT ccontrol, PLBOOL ifbtime_offset, PLINT year,
526 PLINT month, PLINT day, PLINT hour, PLINT min,
527 PLFLT sec )
528{
529 set_stream();
530
531 plconfigtime( scale, offset1, offset2, ccontrol, ifbtime_offset, year,
532 month, day, hour, min, sec );
533}
534
535
536
537// Draws a contour plot from data in f(nx,ny). Is just a front-end to
538// plfcont, with a particular choice for f2eval and f2eval_data.
539
540void plstream::cont( const PLFLT * const *f, PLINT nx, PLINT ny, PLINT kx, PLINT lx,
541 PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel,
542 PLTRANSFORM_callback pltr, PLPointer pltr_data )
543{
544 set_stream();
545
546 plcont( f, nx, ny, kx, lx, ky, ly, clevel, nlevel,
547 pltr, pltr_data );
548}
549
550// Draws a contour plot using the function evaluator f2eval and data stored
551// by way of the f2eval_data pointer. This allows arbitrary organizations
552// of 2d array data to be used.
553
555 PLPointer f2eval_data,
556 PLINT nx, PLINT ny, PLINT kx, PLINT lx,
557 PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel,
558 PLTRANSFORM_callback pltr, PLPointer pltr_data )
559{
560 set_stream();
561
562 plfcont( f2eval, f2eval_data,
563 nx, ny, kx, lx, ky, ly, clevel, nlevel,
564 pltr, pltr_data );
565}
566
567// Copies state parameters from the reference stream to the current stream.
568
569void plstream::cpstrm( plstream & pls, bool flags )
570{
571 set_stream();
572
573 plcpstrm( pls.stream, (PLBOOL) flags );
574}
575
576// Calculate continuous time from broken-down time for current stream.
577void plstream::ctime( PLINT year, PLINT month, PLINT day, PLINT hour, PLINT min,
578 PLFLT sec, PLFLT & ctime )
579{
580 set_stream();
581
582 plctime( year, month, day, hour, min, sec, &ctime );
583}
584
585// Converts input values from relative device coordinates to relative plot
586// coordinates.
587
588void plstream::did2pc( PLFLT & xmin, PLFLT & ymin, PLFLT & xmax, PLFLT & ymax )
589{
590 set_stream();
591
592 pldid2pc( &xmin, &ymin, &xmax, &ymax );
593}
594
595// Converts input values from relative plot coordinates to relative device
596// coordinates.
597
598void plstream::dip2dc( PLFLT & xmin, PLFLT & ymin, PLFLT & xmax, PLFLT & ymax )
599{
600 set_stream();
601
602 pldip2dc( &xmin, &ymin, &xmax, &ymax );
603}
604
605// These shouldn't be needed, are supposed to be handled by ctor/dtor
606// semantics of the plstream object.
607
608// End a plotting session for all open streams.
609
610// void plstream::end()
611// {
612// set_stream();
613
614// plend();
615// }
616
617// End a plotting session for the current stream only.
618
619// void plstream::end1()
620// {
621// set_stream();
622
623// plend1();
624// }
625
626// Simple interface for defining viewport and window.
627
628void plstream::env( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
629 PLINT just, PLINT axis )
630{
631 set_stream();
632
633 plenv( xmin, xmax, ymin, ymax, just, axis );
634}
635
636// Similar to env() above, but in multiplot mode does not advance
637// the subpage, instead the current subpage is cleared
638
639void plstream::env0( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
640 PLINT just, PLINT axis )
641{
642 set_stream();
643
644 plenv0( xmin, xmax, ymin, ymax, just, axis );
645}
646
647// End current page. Should only be used with plbop().
648
650{
651 set_stream();
652
653 pleop();
654}
655
656// Plot horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i)).
657
658void plstream::errx( PLINT n, const PLFLT *xmin, const PLFLT *xmax, const PLFLT *y )
659{
660 set_stream();
661
662 plerrx( n, xmin, xmax, y );
663}
664
665// Plot vertical error bars (x,ymin(i)) to (x(i),ymax(i)).
666
667void plstream::erry( PLINT n, const PLFLT *x, const PLFLT *ymin, const PLFLT *ymax )
668{
669 set_stream();
670
671 plerry( n, x, ymin, ymax );
672}
673
674// Advance to the next family file on the next new page.
675
677{
678 set_stream();
679
680 plfamadv();
681}
682
683// Pattern fills the polygon bounded by the input points.
684
685void plstream::fill( PLINT n, const PLFLT *x, const PLFLT *y )
686{
687 set_stream();
688
689 plfill( n, x, y );
690}
691
692// Pattern fills the 3d polygon bounded by the input points.
693
694void plstream::fill3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z )
695{
696 set_stream();
697
698 plfill3( n, x, y, z );
699}
700
701// Flushes the output stream. Use sparingly, if at all.
702
704{
705 set_stream();
706
707 ::c_plflush();
708}
709
710// Sets the global font flag to 'ifont'.
711
713{
714 set_stream();
715
716 plfont( ifont );
717}
718
719// Load specified font set.
720
722{
723 set_stream();
724
725 plfontld( fnt );
726}
727
728// Get character default height and current (scaled) height.
729
730void plstream::gchr( PLFLT & p_def, PLFLT & p_ht )
731{
732 set_stream();
733
734 plgchr( &p_def, &p_ht );
735}
736
737// Returns 8 bit RGB values for given color from color map 0.
738
739void plstream::gcol0( PLINT icol0, PLINT & r, PLINT & g, PLINT & b )
740{
741 set_stream();
742
743 plgcol0( icol0, &r, &g, &b );
744}
745
746// Returns 8 bit RGB values + alpha value for given color from color map 0.
747
748void plstream::gcol0a( PLINT icol0, PLINT & r, PLINT & g, PLINT & b, PLFLT & a )
749{
750 set_stream();
751
752 plgcol0a( icol0, &r, &g, &b, &a );
753}
754
755// Returns the background color by 8 bit RGB value.
756
757void plstream::gcolbg( PLINT & r, PLINT & g, PLINT & b )
758{
759 set_stream();
760
761 plgcolbg( &r, &g, &b );
762}
763
764// Returns the background color by 8 bit RGB value + alpha value.
765
766void plstream::gcolbga( PLINT & r, PLINT & g, PLINT & b, PLFLT & a )
767{
768 set_stream();
769
770 plgcolbga( &r, &g, &b, &a );
771}
772
773// Returns the current compression setting
774
775void plstream::gcompression( PLINT & compression )
776{
777 set_stream();
778
779 plgcompression( &compression );
780}
781
782// Retrieve current window into device space.
783
784void plstream::gdidev( PLFLT & mar, PLFLT & aspect, PLFLT & jx, PLFLT & jy )
785{
786 set_stream();
787
788 plgdidev( &mar, &aspect, &jx, &jy );
789}
790
791// Get plot orientation.
792
794{
795 set_stream();
796
797 plgdiori( &rot );
798}
799
800// Retrieve current window into plot space.
801
802void plstream::gdiplt( PLFLT & xmin, PLFLT & ymin, PLFLT & xmax, PLFLT & ymax )
803{
804 set_stream();
805
806 plgdiplt( &xmin, &ymin, &xmax, &ymax );
807}
808
809// Get FCI (font characterization integer)
810
812{
813 set_stream();
814
815 plgfci( &pfci );
816}
817
818// Get family file parameters.
819
820void plstream::gfam( PLINT & fam, PLINT & num, PLINT & bmax )
821{
822 set_stream();
823
824 plgfam( &fam, &num, &bmax );
825}
826
827// Get the (current) output file name. Must be preallocated to >80 bytes.
828
829void plstream::gfnam( char *fnam )
830{
831 set_stream();
832
833 plgfnam( fnam );
834}
835
836// Get the current font family, style and weight
837
838void plstream::gfont( PLINT & family, PLINT & style, PLINT & weight )
839{
840 set_stream();
841
842 plgfont( &family, &style, &weight );
843}
844
845// Get current run level.
846
847void plstream::glevel( PLINT & level )
848{
849 set_stream();
850
851 plglevel( &level );
852}
853
854// Get output device parameters.
855
856void plstream::gpage( PLFLT & xp, PLFLT & yp, PLINT & xleng, PLINT & yleng,
857 PLINT & xoff, PLINT & yoff )
858{
859 set_stream();
860
861 plgpage( &xp, &yp, &xleng, &yleng, &xoff, &yoff );
862}
863
864// Switches to graphics screen.
865
867{
868 set_stream();
869
870 plgra();
871}
872
873
874// Draw gradient in polygon.
875
876void plstream::gradient( PLINT n, const PLFLT *x, const PLFLT *y, PLFLT angle )
877{
878 set_stream();
879
880 plgradient( n, x, y, angle );
881}
882
883// grid irregularly sampled data
884void plstream::griddata( const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT npts,
885 const PLFLT *xg, PLINT nptsx, const PLFLT *yg, PLINT nptsy,
886 PLFLT **zg, PLINT type, PLFLT data )
887{
888 set_stream();
889
890 plgriddata( x, y, z, npts, xg, nptsx, yg, nptsy, zg, type, data );
891}
892
893// Get subpage boundaries in absolute coordinates.
894
895void plstream::gspa( PLFLT & xmin, PLFLT & xmax, PLFLT & ymin, PLFLT & ymax )
896{
897 set_stream();
898
899 plgspa( &xmin, &xmax, &ymin, &ymax );
900}
901
902// This shouldn't be needed in this model.
903
904// Get current stream number.
905
906// void plstream::gstrm( PLINT *p_strm )
907// {
908// set_stream();
909
910// plgstrm(p_strm);
911// }
912
913// Get the current library version number.
914
915void plstream::gver( char *p_ver )
916{
917 set_stream();
918
919 plgver( p_ver );
920}
921
922// Get viewport window in normalized world coordinates
923
924void plstream::gvpd( PLFLT & xmin, PLFLT & xmax, PLFLT & ymin, PLFLT & ymax )
925{
926 set_stream();
927
928 plgvpd( &xmin, &xmax, &ymin, &ymax );
929}
930
931// Get viewport window in world coordinates
932
933void plstream::gvpw( PLFLT & xmin, PLFLT & xmax, PLFLT & ymin, PLFLT & ymax )
934{
935 set_stream();
936
937 plgvpw( &xmin, &xmax, &ymin, &ymax );
938}
939
940// Get x axis labeling parameters.
941
942void plstream::gxax( PLINT & digmax, PLINT & digits )
943{
944 set_stream();
945
946 plgxax( &digmax, &digits );
947}
948
949// Get y axis labeling parameters.
950
951void plstream::gyax( PLINT & digmax, PLINT & digits )
952{
953 set_stream();
954
955 plgyax( &digmax, &digits );
956}
957
958// Get z axis labeling parameters
959
960void plstream::gzax( PLINT & digmax, PLINT & digits )
961{
962 set_stream();
963
964 plgzax( &digmax, &digits );
965}
966
967// Draws a histogram of n values of a variable in array data[0..n-1]
968
969void plstream::hist( PLINT n, const PLFLT *data, PLFLT datmin, PLFLT datmax,
970 PLINT nbin, PLINT oldwin )
971{
972 set_stream();
973
974 plhist( n, data, datmin, datmax, nbin, oldwin );
975}
976
977// Set current color (map 0) by hue, lightness, and saturation.
978
979// Initializes PLplot, using preset or default options
980
982{
983 set_stream();
984
985 plinit();
986
987 plgstrm( &stream );
988
989 // This is only set in the constructor.
990 //active_streams++;
991}
992
993// Draws a line segment from (x1, y1) to (x2, y2).
994
995void plstream::join( PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 )
996{
997 set_stream();
998
999 pljoin( x1, y1, x2, y2 );
1000}
1001
1002// Simple routine for labelling graphs.
1003
1004void plstream::lab( const char *xlabel, const char *ylabel,
1005 const char *tlabel )
1006{
1007 set_stream();
1008
1009 pllab( xlabel, ylabel, tlabel );
1010}
1011
1012// Routine for drawing line, symbol, or cmap0 legends
1013
1014void plstream::legend( PLFLT *p_legend_width, PLFLT *p_legend_height,
1015 PLINT opt, PLINT position, PLFLT x, PLFLT y, PLFLT plot_width,
1016 PLINT bg_color, PLINT bb_color, PLINT bb_style,
1017 PLINT nrow, PLINT ncolumn,
1018 PLINT nlegend, const PLINT *opt_array,
1019 PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing,
1020 PLFLT text_justification,
1021 const PLINT *text_colors, const char * const *text,
1022 const PLINT *box_colors, const PLINT *box_patterns,
1023 const PLFLT *box_scales, const PLFLT *box_line_widths,
1024 const PLINT *line_colors, const PLINT *line_styles,
1025 const PLFLT *line_widths,
1026 const PLINT *symbol_colors, const PLFLT *symbol_scales,
1027 const PLINT *symbol_numbers, const char * const *symbols )
1028{
1029 set_stream();
1030
1031 pllegend( p_legend_width, p_legend_height, opt, position, x, y, plot_width,
1032 bg_color, bb_color, bb_style, nrow, ncolumn, nlegend, opt_array,
1033 text_offset, text_scale, text_spacing, text_justification,
1034 text_colors, text, box_colors, box_patterns, box_scales,
1035 box_line_widths, line_colors, line_styles, line_widths,
1036 symbol_colors, symbol_scales, symbol_numbers, symbols );
1037}
1038
1039void plstream::colorbar( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
1040 PLINT opt, PLINT position, PLFLT x, PLFLT y,
1041 PLFLT x_length, PLFLT y_length,
1042 PLINT bg_color, PLINT bb_color, PLINT bb_style,
1043 PLFLT low_cap_color, PLFLT high_cap_color,
1044 PLINT cont_color, PLFLT cont_width,
1045 PLINT n_labels, PLINT *label_opts, const char * const *label,
1046 PLINT n_axes, const char * const *axis_opts,
1047 PLFLT *ticks, PLINT *sub_ticks,
1048 PLINT *n_values, const PLFLT * const *values )
1049{
1050 set_stream();
1051
1052 plcolorbar( p_colorbar_width, p_colorbar_height, opt, position, x, y,
1053 x_length, y_length, bg_color, bb_color, bb_style,
1054 low_cap_color, high_cap_color, cont_color, cont_width,
1055 n_labels, label_opts, label, n_axes, axis_opts,
1056 ticks, sub_ticks, n_values, values );
1057}
1058
1059
1060// Sets position of the light source
1061
1063{
1064 set_stream();
1065
1066 pllightsource( x, y, z );
1067}
1068
1069// Draws line segments connecting a series of points.
1070
1071void plstream::line( PLINT n, const PLFLT *x, const PLFLT *y )
1072{
1073 set_stream();
1074
1075 plline( n, x, y );
1076}
1077
1078// Draws a line in 3 space.
1079
1080void plstream::line3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z )
1081{
1082 set_stream();
1083
1084 plline3( n, x, y, z );
1085}
1086
1087// Set line style.
1088
1090{
1091 set_stream();
1092
1093 pllsty( lin );
1094}
1095
1096// Plot continental outline in world coordinates
1097
1099 const char *name, PLFLT minx, PLFLT maxx,
1100 PLFLT miny, PLFLT maxy )
1101{
1102 set_stream();
1103
1104 plmap( mapform, name, minx, maxx, miny, maxy );
1105}
1106
1107// Plot map lines
1108
1110 PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy,
1111 const PLINT *plotentries, PLINT nplotentries )
1112{
1113 set_stream();
1114
1115 plmapline( mapform, name, minx, maxx, miny, maxy, plotentries, nplotentries );
1116}
1117
1118// Plot map points
1119
1121 const char *name, const char *string,
1122 PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy,
1123 const PLINT *plotentries, PLINT nplotentries )
1124{
1125 set_stream();
1126
1127 plmapstring( mapform, name, string, minx, maxx, miny, maxy, plotentries, nplotentries );
1128}
1129
1130// Plot map text
1131
1133 const char *name, PLFLT dx, PLFLT dy, PLFLT just, const char *text,
1134 PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy,
1135 PLINT plotentry )
1136{
1137 set_stream();
1138
1139 plmaptex( mapform, name, dx, dy, just, text, minx, maxx, miny, maxy, plotentry );
1140}
1141
1142// Plot map fills
1143
1145 const char *name, PLFLT minx, PLFLT maxx, PLFLT miny,
1146 PLFLT maxy, const PLINT *plotentries, PLINT nplotentries )
1147{
1148 set_stream();
1149
1150 plmapfill( mapform, name, minx, maxx, miny, maxy, plotentries, nplotentries );
1151}
1152
1153// Plot the latitudes and longitudes on the background.
1154
1156 PLFLT dlong, PLFLT dlat,
1157 PLFLT minlong, PLFLT maxlong,
1158 PLFLT minlat, PLFLT maxlat )
1159{
1160 set_stream();
1161
1162 plmeridians( mapform, dlong, dlat, minlong, maxlong, minlat,
1163 maxlat );
1164}
1165
1166// Plots a mesh representation of the function z[x][y].
1167
1168void plstream::mesh( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny,
1169 PLINT opt )
1170{
1171 set_stream();
1172
1173 plmesh( x, y, z, nx, ny, opt );
1174}
1175
1176// Plots a mesh representation of the function z[x][y] with contour.
1177
1178void plstream::meshc( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny,
1179 PLINT opt, const PLFLT *clevel, PLINT nlevel )
1180{
1181 set_stream();
1182
1183 plmeshc( x, y, z, nx, ny, opt, clevel, nlevel );
1184}
1185
1186// Creates a new stream and makes it the default.
1187
1188// void plstream::mkstrm( PLINT *p_strm )
1189// {
1190// set_stream();
1191
1192// plmkstrm(p_strm);
1193// }
1194
1195// Prints out "text" at specified position relative to viewport
1196
1197void plstream::mtex( const char *side, PLFLT disp, PLFLT pos, PLFLT just,
1198 const char *text )
1199{
1200 set_stream();
1201
1202 plmtex( side, disp, pos, just, text );
1203}
1204
1205// Prints out "text" at specified position relative to viewport (3D)
1206
1207void plstream::mtex3( const char *side, PLFLT disp, PLFLT pos, PLFLT just,
1208 const char *text )
1209{
1210 set_stream();
1211
1212 plmtex3( side, disp, pos, just, text );
1213}
1214
1215// Plots a 3-d shaded representation of the function z[x][y].
1216
1217void plstream::surf3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z,
1218 PLINT nx, PLINT ny, PLINT opt,
1219 const PLFLT *clevel, PLINT nlevel )
1220{
1221 set_stream();
1222
1223 plsurf3d( x, y, z, nx, ny, opt, clevel, nlevel );
1224}
1225
1226// Plots a 3-d shaded representation of the function z[x][y] with
1227// y index limits
1228
1229void plstream::surf3dl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z,
1230 PLINT nx, PLINT ny, PLINT opt,
1231 const PLFLT *clevel, PLINT nlevel,
1232 PLINT ixstart, PLINT ixn,
1233 const PLINT *indexymin, const PLINT *indexymax )
1234{
1235 set_stream();
1236
1237 plsurf3dl( x, y, z, nx, ny, opt, clevel, nlevel, ixstart, ixn,
1238 indexymin, indexymax );
1239}
1240
1241// Plots a 3-d representation of the function z[x][y].
1242
1243void plstream::plot3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z,
1244 PLINT nx, PLINT ny, PLINT opt, bool side )
1245{
1246 set_stream();
1247
1248 ::plot3d( x, y, z, nx, ny, opt, (PLBOOL) side );
1249}
1250
1251// Plots a 3-d representation of the function z[x][y] with contour.
1252
1253void plstream::plot3dc( const PLFLT *x, const PLFLT *y, const PLFLT * const *z,
1254 PLINT nx, PLINT ny, PLINT opt,
1255 const PLFLT *clevel, PLINT nlevel )
1256{
1257 set_stream();
1258
1259 ::plot3dc( x, y, z, nx, ny, opt, clevel, nlevel );
1260}
1261
1262// Plots a 3-d representation of the function z[x][y] with contour
1263// and y index limits
1264
1265void plstream::plot3dcl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z,
1266 PLINT nx, PLINT ny, PLINT opt,
1267 const PLFLT *clevel, PLINT nlevel,
1268 PLINT ixstart, PLINT ixn,
1269 const PLINT *indexymin, const PLINT *indexymax )
1270{
1271 set_stream();
1272
1273 ::plot3dcl( x, y, z, nx, ny, opt, clevel, nlevel, ixstart, ixn,
1274 indexymin, indexymax );
1275}
1276
1277// Process options list using current options info.
1278
1279PLINT plstream::parseopts( int *p_argc, char **argv, PLINT mode )
1280{
1281 set_stream();
1282
1283 return ::plparseopts( p_argc, argv, mode );
1284}
1285
1286// Set fill pattern directly.
1287
1288void plstream::pat( PLINT nlin, const PLINT *inc, const PLINT *del )
1289{
1290 set_stream();
1291
1292 plpat( nlin, inc, del );
1293}
1294
1295// Draw a line connecting two points, accounting for coordinate transforms
1296
1297void plstream::path( PLINT n, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 )
1298{
1299 set_stream();
1300
1301 plpath( n, x1, y1, x2, y2 );
1302}
1303
1304// Plots array y against x for n points using ASCII code "code".
1305
1306void plstream::poin( PLINT n, const PLFLT *x, const PLFLT *y, PLINT code )
1307{
1308 set_stream();
1309
1310 plpoin( n, x, y, code );
1311}
1312
1313// Draws a series of points in 3 space.
1314
1315void plstream::poin3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT code )
1316{
1317 set_stream();
1318
1319 plpoin3( n, x, y, z, code );
1320}
1321
1322// Draws a polygon in 3 space.
1323
1324void plstream::poly3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z,
1325 const bool *draw, bool ifcc )
1326{
1327 PLBOOL *loc_draw = new PLBOOL[n - 1];
1328 for ( int i = 0; i < n - 1; i++ )
1329 {
1330 loc_draw[i] = (PLBOOL) draw[i];
1331 }
1332
1333 set_stream();
1334
1335 plpoly3( n, x, y, z, loc_draw, (PLBOOL) ifcc );
1336
1337 delete [] loc_draw;
1338}
1339
1340// Set the floating point precision (in number of places) in numeric labels.
1341
1342void plstream::prec( PLINT setp, PLINT prec )
1343{
1344 set_stream();
1345
1346 plprec( setp, prec );
1347}
1348
1349// Set fill pattern, using one of the predefined patterns.
1350
1352{
1353 set_stream();
1354
1355 plpsty( patt );
1356}
1357
1358// Prints out "text" at world cooordinate (x,y).
1359
1360void plstream::ptex( PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just,
1361 const char *text )
1362{
1363 set_stream();
1364
1365 plptex( x, y, dx, dy, just, text );
1366}
1367
1368// Prints out "text" at world cooordinate (x,y).
1369
1371 PLFLT dx, PLFLT dy, PLFLT dz,
1372 PLFLT sx, PLFLT sy, PLFLT sz, PLFLT just,
1373 const char *text )
1374{
1375 set_stream();
1376
1377 plptex3( wx, wy, wz, dx, dy, dz, sx, sy, sz, just, text );
1378}
1379
1380// Get the world coordinates associated with device coordinates
1381
1383{
1384 set_stream();
1385
1386 return plTranslateCursor( gin );
1387}
1388
1389// Replays contents of plot buffer to current device/file.
1390
1392{
1393 set_stream();
1394
1395 plreplot();
1396}
1397
1398// Set character height.
1399
1400void plstream::schr( PLFLT def, PLFLT scale )
1401{
1402 set_stream();
1403
1404 plschr( def, scale );
1405}
1406
1407// Set number of colors in cmap 0
1408
1410{
1411 set_stream();
1412
1413 plscmap0n( ncol0 );
1414}
1415
1416// Set number of colors in cmap 1
1417
1419{
1420 set_stream();
1421
1422 plscmap1n( ncol1 );
1423}
1424
1425// Set number of colors in cmap 1
1426
1427void plstream::scmap1_range( PLFLT min_color, PLFLT max_color )
1428{
1429 set_stream();
1430
1431 plscmap1_range( min_color, max_color );
1432}
1433
1434// Set number of colors in cmap 1
1435
1436void plstream::gcmap1_range( PLFLT & min_color, PLFLT & max_color )
1437{
1438 set_stream();
1439
1440 plgcmap1_range( &min_color, &max_color );
1441}
1442
1443// Set color map 0 colors by 8 bit RGB values
1444
1445void plstream::scmap0( const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol0 )
1446{
1447 set_stream();
1448
1449 plscmap0( r, g, b, ncol0 );
1450}
1451
1452// Set color map 0 colors by 8 bit RGB values + alpha value
1453
1454void plstream::scmap0a( const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *a, PLINT ncol0 )
1455{
1456 set_stream();
1457
1458 plscmap0a( r, g, b, a, ncol0 );
1459}
1460
1461// Set color map 1 colors by 8 bit RGB values
1462
1463void plstream::scmap1( const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol1 )
1464{
1465 set_stream();
1466
1467 plscmap1( r, g, b, ncol1 );
1468}
1469
1470// Set color map 1 colors by 8 bit RGB values + alpha value
1471
1472void plstream::scmap1a( const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *a, PLINT ncol1 )
1473{
1474 set_stream();
1475
1476 plscmap1a( r, g, b, a, ncol1 );
1477}
1478
1479// Set color map 1 colors using a piece-wise linear relationship between
1480// intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
1481
1482void plstream::scmap1l( bool itype, PLINT npts, const PLFLT *intensity,
1483 const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3,
1484 const bool *alt_hue_path )
1485{
1486 PLBOOL *loc_alt_hue_path = NULL;
1487 if ( alt_hue_path != NULL )
1488 {
1489 loc_alt_hue_path = new PLBOOL[npts - 1];
1490 for ( int i = 0; i < npts - 1; i++ )
1491 {
1492 loc_alt_hue_path[i] = (PLBOOL) alt_hue_path[i];
1493 }
1494 }
1495
1496 set_stream();
1497
1498 plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_alt_hue_path );
1499
1500 if ( loc_alt_hue_path != NULL )
1501 delete [] loc_alt_hue_path;
1502}
1503
1504// Set color map 1 colors using a piece-wise linear relationship between
1505// intensity [0,1] (cmap 1 index) and position in HLS or RGB color space
1506// and alpha value.
1507
1508void plstream::scmap1la( bool itype, PLINT npts, const PLFLT *intensity,
1509 const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3,
1510 const PLFLT *a, const bool *alt_hue_path )
1511{
1512 PLBOOL *loc_alt_hue_path = NULL;
1513 if ( alt_hue_path != NULL )
1514 {
1515 loc_alt_hue_path = new PLBOOL[npts - 1];
1516 for ( int i = 0; i < npts - 1; i++ )
1517 {
1518 loc_alt_hue_path[i] = (PLBOOL) alt_hue_path[i];
1519 }
1520 }
1521
1522 set_stream();
1523
1524 plscmap1la( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3,
1525 a, loc_alt_hue_path );
1526
1527 if ( loc_alt_hue_path != NULL )
1528 delete [] loc_alt_hue_path;
1529}
1530
1531//
1532// void plstream::scmap1l( bool itype, PLINT npts, PLFLT *intensity,
1533// PLFLT *coord1, PLFLT *coord2, PLFLT *coord3)
1534// {
1535// set_stream();
1536//
1537// plscmap1l((PLBOOL) itype,npts,intensity,coord1,coord2,coord3,NULL);
1538//
1539// }
1540
1541// Set a given color from color map 0 by 8 bit RGB value
1542
1543void plstream::scol0( PLINT icol0, PLINT r, PLINT g, PLINT b )
1544{
1545 set_stream();
1546
1547 plscol0( icol0, r, g, b );
1548}
1549
1550// Set a given color from color map 0 by 8 bit RGB value + alpha value
1551
1552void plstream::scol0a( PLINT icol0, PLINT r, PLINT g, PLINT b, PLFLT a )
1553{
1554 set_stream();
1555
1556 plscol0a( icol0, r, g, b, a );
1557}
1558
1559// Set the background color by 8 bit RGB value
1560
1562{
1563 set_stream();
1564
1565 plscolbg( r, g, b );
1566}
1567
1568// Set the background color by 8 bit RGB + alpha value
1569
1571{
1572 set_stream();
1573
1574 plscolbga( r, g, b, a );
1575}
1576
1577// Used to globally turn color output on/off
1578
1580{
1581 set_stream();
1582
1583 plscolor( color );
1584}
1585
1586// Sets the compression level
1587
1589{
1590 set_stream();
1591
1592 plscompression( compression );
1593}
1594
1595// Set the device (keyword) name
1596
1597void plstream::sdev( const char *devname )
1598{
1599 set_stream();
1600
1601 plsdev( devname );
1602}
1603
1604// Get the device (keyword) name
1605
1606void plstream::gdev( char *devname )
1607{
1608 set_stream();
1609
1610 plgdev( devname );
1611}
1612
1613// Set window into device space using margin, aspect ratio, and
1614// justification
1615
1616void plstream::sdidev( PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy )
1617{
1618 set_stream();
1619
1620 plsdidev( mar, aspect, jx, jy );
1621}
1622
1623// Set up transformation from metafile coordinates.
1624
1625void plstream::sdimap( PLINT dimxmin, PLINT dimxmax,
1626 PLINT dimymin, PLINT dimymax,
1627 PLFLT dimxpmm, PLFLT dimypmm )
1628{
1629 set_stream();
1630
1631 plsdimap( dimxmin, dimxmax, dimymin, dimymax, dimxpmm, dimypmm );
1632}
1633
1634// Set plot orientation, specifying rotation in units of pi/2.
1635
1637{
1638 set_stream();
1639
1640 plsdiori( rot );
1641}
1642
1643// Set window into plot space
1644
1645void plstream::sdiplt( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax )
1646{
1647 set_stream();
1648
1649 plsdiplt( xmin, ymin, xmax, ymax );
1650}
1651
1652// Set window into plot space incrementally (zoom)
1653
1654void plstream::sdiplz( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax )
1655{
1656 set_stream();
1657
1658 plsdiplz( xmin, ymin, xmax, ymax );
1659}
1660
1661// Set the escape character for text strings.
1662
1663void plstream::sesc( char esc )
1664{
1665 set_stream();
1666
1667 plsesc( esc );
1668}
1669
1670// Set the offset and spacing of contour labels
1671
1672void plstream::setcontlabelparam( PLFLT offset, PLFLT size, PLFLT spacing,
1673 PLINT active )
1674{
1675 set_stream();
1676
1677 pl_setcontlabelparam( offset, size, spacing, active );
1678}
1679
1680// Set the format of the contour labels
1681
1683{
1684 set_stream();
1685
1686 pl_setcontlabelformat( lexp, sigdig );
1687}
1688
1689// Set family file parameters
1690
1691void plstream::sfam( PLINT fam, PLINT num, PLINT bmax )
1692{
1693 set_stream();
1694
1695 plsfam( fam, num, bmax );
1696}
1697
1698// Set FCI (font characterization integer)
1699
1701{
1702 set_stream();
1703
1704 plsfci( fci );
1705}
1706
1707// Set the output file name.
1708
1709void plstream::sfnam( const char *fnam )
1710{
1711 set_stream();
1712
1713 plsfnam( fnam );
1714}
1715
1716// Set the pointer to the data used in driver initialisation
1717
1718void plstream::sdevdata( void *data )
1719{
1720 set_stream();
1721
1722 plsdevdata( data );
1723}
1724
1725// Set the current font family, style and weight
1726
1727void plstream::sfont( PLINT family, PLINT style, PLINT weight )
1728{
1729 set_stream();
1730
1731 plsfont( family, style, weight );
1732}
1733
1734// Shade region.
1735
1736void
1737plstream::shade( const PLFLT * const *a, PLINT nx, PLINT ny,
1738 PLDEFINED_callback defined,
1739 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top,
1740 PLFLT shade_min, PLFLT shade_max,
1741 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
1742 PLINT min_color, PLFLT min_width,
1743 PLINT max_color, PLFLT max_width,
1744 PLFILL_callback fill, bool rectangular,
1745 PLTRANSFORM_callback pltr, PLPointer pltr_data )
1746{
1747 set_stream();
1748
1749 plshade( a, nx, ny, defined, left, right, bottom, top,
1750 shade_min, shade_max,
1751 sh_cmap, sh_color, sh_width,
1752 min_color, min_width, max_color, max_width,
1753 fill, (PLBOOL) rectangular, pltr, pltr_data );
1754}
1755
1756void
1757plstream::shades( const PLFLT * const *a, PLINT nx, PLINT ny,
1758 PLDEFINED_callback defined,
1759 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
1760 const PLFLT *clevel, PLINT nlevel, PLFLT fill_width,
1761 PLINT cont_color, PLFLT cont_width,
1762 PLFILL_callback fill, bool rectangular,
1763 PLTRANSFORM_callback pltr, PLPointer pltr_data )
1764{
1765 set_stream();
1766
1767 plshades( a, nx, ny, defined, xmin, xmax, ymin, ymax,
1768 clevel, nlevel, fill_width, cont_color, cont_width,
1769 fill, (PLBOOL) rectangular, pltr, pltr_data );
1770}
1771
1772void
1774 PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max,
1775 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
1776 PLINT min_color, PLFLT min_width,
1777 PLINT max_color, PLFLT max_width,
1778 bool rectangular,
1779 Coord_Xformer *pcxf )
1780{
1781 set_stream();
1782
1783 int nx, ny;
1784 d.elements( nx, ny );
1785
1786 if ( pcxf != NULL )
1788 NULL, NULL,
1789 nx, ny,
1790 xmin, xmax, ymin, ymax, shade_min, shade_max,
1791 sh_cmap, sh_color, sh_width,
1792 min_color, min_width, max_color, max_width,
1793 plcallback::fill, rectangular,
1794 Coord_Xform_evaluator, pcxf );
1795 else
1796 ::plfshade( Contourable_Data_evaluator, &d,
1797 NULL, NULL,
1798 nx, ny,
1799 xmin, xmax, ymin, ymax, shade_min, shade_max,
1800 sh_cmap, sh_color, sh_width,
1801 min_color, min_width, max_color, max_width,
1802 plcallback::fill, rectangular,
1803 NULL, NULL );
1804}
1805
1806#ifdef PL_DEPRECATED
1807void
1808plstream::shade1( const PLFLT *a, PLINT nx, PLINT ny,
1809 PLDEFINED_callback defined,
1810 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top,
1811 PLFLT shade_min, PLFLT shade_max,
1812 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
1813 PLINT min_color, PLFLT min_width,
1814 PLINT max_color, PLFLT max_width,
1815 PLFILL_callback fill, bool rectangular,
1816 PLTRANSFORM_callback pltr, PLPointer pltr_data )
1817{
1818 set_stream();
1819
1820 plshade1( a, nx, ny, defined,
1821 left, right, bottom, top,
1822 shade_min, shade_max,
1823 sh_cmap, sh_color, sh_width,
1824 min_color, min_width, max_color, max_width,
1825 fill, (PLBOOL) rectangular, pltr, pltr_data );
1826}
1827
1828// Deprecated version using PLINT not bool
1829void
1830plstream::shade1( const PLFLT *a, PLINT nx, PLINT ny,
1831 PLDEFINED_callback defined,
1832 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top,
1833 PLFLT shade_min, PLFLT shade_max,
1834 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
1835 PLINT min_color, PLFLT min_width,
1836 PLINT max_color, PLFLT max_width,
1837 PLFILL_callback fill, PLINT rectangular,
1838 PLTRANSFORM_callback pltr, PLPointer pltr_data )
1839{
1840 set_stream();
1841
1842 plshade1( a, nx, ny, defined,
1843 left, right, bottom, top,
1844 shade_min, shade_max,
1845 sh_cmap, sh_color, sh_width,
1846 min_color, min_width, max_color, max_width,
1847 fill, (PLBOOL) rectangular, pltr, pltr_data );
1848}
1849#endif //PL_DEPRECATED
1850
1851void
1853 PLPointer f2eval_data,
1854 PLFLT ( *c2eval )( PLINT, PLINT, PLPointer ),
1855 PLPointer c2eval_data,
1856 PLINT nx, PLINT ny,
1857 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top,
1858 PLFLT shade_min, PLFLT shade_max,
1859 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
1860 PLINT min_color, PLFLT min_width,
1861 PLINT max_color, PLFLT max_width,
1862 PLFILL_callback fill, bool rectangular,
1863 PLTRANSFORM_callback pltr, PLPointer pltr_data )
1864{
1865 set_stream();
1866
1867 plfshade( f2eval, f2eval_data,
1868 c2eval, c2eval_data,
1869 nx, ny, left, right, bottom, top,
1870 shade_min, shade_max,
1871 sh_cmap, sh_color, sh_width,
1872 min_color, min_width, max_color, max_width,
1873 fill, (PLBOOL) rectangular, pltr, pltr_data );
1874}
1875
1876// Setup a user-provided custom labeling function
1877
1879{
1880 set_stream();
1881
1882 plslabelfunc( label_func, label_data );
1883}
1884
1885// Set up lengths of major tick marks.
1886
1887void plstream::smaj( PLFLT def, PLFLT scale )
1888{
1889 set_stream();
1890
1891 plsmaj( def, scale );
1892}
1893
1894// Set the RGB memory area to be plotted (with the 'mem' or 'memcairo' drivers)
1895
1896void plstream::smem( PLINT maxx, PLINT maxy, void *plotmem )
1897{
1898 set_stream();
1899
1900 plsmem( maxx, maxy, plotmem );
1901}
1902
1903// Set the RGBA memory area to be plotted (with the 'memcairo' drivers)
1904
1905void plstream::smema( PLINT maxx, PLINT maxy, void *plotmem )
1906{
1907 set_stream();
1908
1909 plsmema( maxx, maxy, plotmem );
1910}
1911
1912// Set up lengths of minor tick marks.
1913
1914void plstream::smin( PLFLT def, PLFLT scale )
1915{
1916 set_stream();
1917
1918 plsmin( def, scale );
1919}
1920
1921// Set orientation. Must be done before calling plinit.
1922
1924{
1925 set_stream();
1926
1927 plsori( ori );
1928}
1929
1930// Set output device parameters. Usually ignored by the driver.
1931
1932void plstream::spage( PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng,
1933 PLINT xoff, PLINT yoff )
1934{
1935 set_stream();
1936
1937 plspage( xp, yp, xleng, yleng, xoff, yoff );
1938}
1939
1940// Set the colors for color table 0 from a cmap0 file
1941
1942void plstream::spal0( const char *filename )
1943{
1944 set_stream();
1945
1946 plspal0( filename );
1947}
1948
1949// Set the colors for color table 1 from a cmap1 file
1950
1951void plstream::spal1( const char *filename, bool interpolate )
1952{
1953 set_stream();
1954
1955 plspal1( filename, (PLBOOL) interpolate );
1956}
1957
1958// Set the pause (on end-of-page) status
1959
1960void plstream::spause( bool pause )
1961{
1962 set_stream();
1963
1964 plspause( (PLBOOL) pause );
1965}
1966
1967// Set stream number.
1968
1970{
1971 set_stream();
1972
1973 plsstrm( strm );
1974}
1975
1976// Set the number of subwindows in x and y
1977
1979{
1980 set_stream();
1981
1982 plssub( nx, ny );
1983}
1984
1985// Set symbol height.
1986
1987void plstream::ssym( PLFLT def, PLFLT scale )
1988{
1989 set_stream();
1990
1991 plssym( def, scale );
1992}
1993
1994// Initialize PLplot, passing in the windows/page settings.
1995
1997{
1998 set_stream();
1999
2000 plstar( nx, ny );
2001}
2002
2003// Initialize PLplot, passing the device name and windows/page settings.
2004
2005void plstream::start( const char *devname, PLINT nx, PLINT ny )
2006{
2007 set_stream();
2008
2009 plstart( devname, nx, ny );
2010}
2011
2012// Set the coordinate transform
2013
2014void plstream::stransform( PLTRANSFORM_callback coordinate_transform, PLPointer coordinate_transform_data )
2015{
2016 set_stream();
2017
2018 plstransform( coordinate_transform, coordinate_transform_data );
2019}
2020
2021// Prints out the same string repeatedly at the n points in world
2022// coordinates given by the x and y arrays. Supersedes plpoin and
2023// plsymbol for the case where text refers to a unicode glyph either
2024// directly as UTF-8 or indirectly via the standard text escape
2025// sequences allowed for PLplot input strings.
2026
2027void plstream::string( PLINT n, const PLFLT *x, const PLFLT *y, const char *string )
2028{
2029 set_stream();
2030 plstring( n, x, y, string );
2031}
2032
2033// Prints out the same string repeatedly at the n points in world
2034// coordinates given by the x, y, and z arrays. Supersedes plpoin3
2035// for the case where text refers to a unicode glyph either directly
2036// as UTF-8 or indirectly via the standard text escape sequences
2037// allowed for PLplot input strings.
2038
2039void plstream::string3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const char *string )
2040{
2041 set_stream();
2042 plstring3( n, x, y, z, string );
2043}
2044
2045// Create 1d stripchart
2046
2047void plstream::stripc( PLINT *id, const char *xspec, const char *yspec,
2048 PLFLT xmin, PLFLT xmax, PLFLT xjump,
2049 PLFLT ymin, PLFLT ymax,
2050 PLFLT xlpos, PLFLT ylpos, bool y_ascl,
2051 bool acc, PLINT colbox, PLINT collab,
2052 const PLINT colline[], const PLINT styline[],
2053 const char *legline[], const char *labx,
2054 const char *laby, const char *labtop )
2055{
2056 set_stream();
2057
2058 plstripc( id, xspec, yspec, xmin, xmax, xjump, ymin, ymax, xlpos, ylpos,
2059 (PLBOOL) y_ascl, (PLBOOL) acc, colbox, collab, colline, styline,
2060 legline, labx, laby, labtop );
2061}
2062
2063
2064// Add a point to a stripchart.
2065
2067{
2068 set_stream();
2069
2070 plstripa( id, pen, x, y );
2071}
2072
2073// Deletes and releases memory used by a stripchart.
2074
2076{
2077 set_stream();
2078
2079 plstripd( id );
2080}
2081
2082// plots a 2d image (or a matrix too large for plshade() ) - colors
2083// automatically scaled
2084
2085void plstream::image( const PLFLT * const *data, PLINT nx, PLINT ny,
2086 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
2087 PLFLT zmin, PLFLT zmax,
2088 PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax )
2089{
2090 set_stream();
2091
2092 plimage( data, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax,
2093 Dxmin, Dxmax, Dymin, Dymax );
2094}
2095
2096// plots a 2d image (or a matrix too large for plshade() )
2097
2098void plstream::imagefr( const PLFLT * const *data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax,
2099 PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax,
2100 PLFLT valuemin, PLFLT valuemax,
2101 PLTRANSFORM_callback pltr, PLPointer pltr_data )
2102{
2103 set_stream();
2104
2105 plimagefr( data, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax,
2106 valuemin, valuemax, pltr, pltr_data );
2107}
2108
2109// Set up a new line style
2110
2111void plstream::styl( PLINT nms, const PLINT *mark, const PLINT *space )
2112{
2113 set_stream();
2114
2115 plstyl( nms, mark, space );
2116}
2117
2118// Sets the edges of the viewport to the specified absolute coordinates
2119
2120void plstream::svpa( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax )
2121{
2122 set_stream();
2123
2124 plsvpa( xmin, xmax, ymin, ymax );
2125}
2126
2127// Set x axis labeling parameters
2128
2129void plstream::sxax( PLINT digmax, PLINT digits )
2130{
2131 set_stream();
2132
2133 plsxax( digmax, digits );
2134}
2135
2136// Set inferior X window
2137
2138void plstream::sxwin( PLINT window_id )
2139{
2140 set_stream();
2141
2142 plsxwin( window_id );
2143}
2144
2145// Set y axis labeling parameters
2146
2147void plstream::syax( PLINT digmax, PLINT digits )
2148{
2149 set_stream();
2150
2151 plsyax( digmax, digits );
2152}
2153
2154// Plots array y against x for n points using Hershey symbol "code"
2155
2156void plstream::sym( PLINT n, const PLFLT *x, const PLFLT *y, PLINT code )
2157{
2158 set_stream();
2159
2160 plsym( n, x, y, code );
2161}
2162
2163// Set z axis labeling parameters
2164
2165void plstream::szax( PLINT digmax, PLINT digits )
2166{
2167 set_stream();
2168
2169 plszax( digmax, digits );
2170}
2171
2172// Switches to text screen.
2173
2175{
2176 set_stream();
2177
2178 pltext();
2179}
2180
2181// Set the format for date / time labels
2182
2183void plstream::timefmt( const char *fmt )
2184{
2185 set_stream();
2186
2187 pltimefmt( fmt );
2188}
2189
2190// Sets the edges of the viewport with the given aspect ratio, leaving
2191// room for labels.
2192
2193void plstream::vasp( PLFLT aspect )
2194{
2195 set_stream();
2196
2197 plvasp( aspect );
2198}
2199
2200// Creates the largest viewport of the specified aspect ratio that fits
2201// within the specified normalized subpage coordinates.
2202
2203void plstream::vpas( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
2204 PLFLT aspect )
2205{
2206 set_stream();
2207
2208 plvpas( xmin, xmax, ymin, ymax, aspect );
2209}
2210
2211// Creates a viewport with the specified normalized subpage coordinates.
2212
2213void plstream::vpor( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax )
2214{
2215 set_stream();
2216
2217 plvpor( xmin, xmax, ymin, ymax );
2218}
2219
2220// Defines a "standard" viewport with seven character heights for
2221// the left margin and four character heights everywhere else.
2222
2224{
2225 set_stream();
2226
2227 plvsta();
2228}
2229
2230// Set up a window for three-dimensional plotting.
2231
2232void plstream::w3d( PLFLT basex, PLFLT basey, PLFLT height, PLFLT xmin0,
2233 PLFLT xmax0, PLFLT ymin0, PLFLT ymax0, PLFLT zmin0,
2234 PLFLT zmax0, PLFLT alt, PLFLT az )
2235{
2236 set_stream();
2237
2238 plw3d( basex, basey, height, xmin0, xmax0, ymin0, ymax0, zmin0, zmax0,
2239 alt, az );
2240}
2241
2242// Set pen width.
2243
2245{
2246 set_stream();
2247
2248 plwidth( width );
2249}
2250
2251// Set up world coordinates of the viewport boundaries (2d plots).
2252
2253void plstream::wind( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax )
2254{
2255 set_stream();
2256
2257 plwind( xmin, xmax, ymin, ymax );
2258}
2259
2260// Set xor mode; mode = 1-enter, 0-leave, status = 0 if not interactive device
2261
2262void plstream::xormod( bool mode, bool *status )
2263{
2264 PLBOOL loc_status;
2265
2266 set_stream();
2267
2268 plxormod( (PLBOOL) mode, &loc_status );
2269
2270 *status = ( loc_status != 0 );
2271}
2272
2273// Set the seed for the random number generator included.
2274
2275void plstream::seed( unsigned int s )
2276{
2277 set_stream();
2278
2279 plseed( s );
2280}
2281
2282// Returns a random number on [0,1]-interval.
2283
2285{
2286 set_stream();
2287
2288 return plrandd();
2289}
2290
2291// The rest for use from C / C++ only
2292
2293// Returns a list of file-oriented device names and their menu strings
2294
2295void plstream::gFileDevs( const char ***p_menustr, const char ***p_devname,
2296 int *p_ndev )
2297{
2298 set_stream();
2299
2300 plgFileDevs( p_menustr, p_devname, p_ndev );
2301}
2302
2303// Set the function pointer for the keyboard event handler
2304
2305void plstream::sKeyEH( void ( *KeyEH )( PLGraphicsIn *, void *, int * ),
2306 void *KeyEH_data )
2307{
2308 set_stream();
2309
2310 plsKeyEH( KeyEH, KeyEH_data );
2311}
2312
2313// Set the variables to be used for storing error info
2314
2315void plstream::sError( PLINT *errcode, char *errmsg )
2316{
2317 set_stream();
2318
2319 plsError( errcode, errmsg );
2320}
2321
2322// Sets an optional user exit handler.
2323
2324void plstream::sexit( int ( *handler )( const char * ) )
2325{
2326 set_stream();
2327
2328 plsexit( handler );
2329}
2330
2331// We obviously won't be using this object from Fortran...
2332// // Identity transformation for plots from Fortran.
2333
2334// void plstream::tr0f(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data )
2335// {
2336// set_stream();
2337
2338// pltr0f(x,y,tx,ty,pltr_data);
2339// }
2340
2341// // Does linear interpolation from doubly dimensioned coord arrays
2342// // (row dominant, i.e. Fortran ordering).
2343
2344// void plstream::tr2f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data )
2345// {
2346// set_stream();
2347
2348// pltr2f(x,y,tx,ty,pltr_data);
2349// }
2350
2351// Example linear transformation function for contour plotter.
2352// This is not actually a part of the core library any more
2353//
2354// void plstream::xform( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty )
2355// {
2356// set_stream();
2357//
2358// xform(x,y,tx,ty);
2359// }
2360
2361// Function evaluators
2362
2363// Does a lookup from a 2d function array. Array is of type (PLFLT **),
2364// and is column dominant (normal C ordering).
2365
2367{
2368 set_stream();
2369
2370 return ::plf2eval2( ix, iy, plf2eval_data );
2371}
2372
2373// Does a lookup from a 2d function array. Array is of type (PLFLT *),
2374// and is column dominant (normal C ordering).
2375
2377{
2378 set_stream();
2379
2380 return ::plf2eval( ix, iy, plf2eval_data );
2381}
2382
2383// Does a lookup from a 2d function array. Array is of type (PLFLT *),
2384// and is row dominant (Fortran ordering).
2385
2387{
2388 set_stream();
2389
2390 return ::plf2evalr( ix, iy, plf2eval_data );
2391}
2392
2393// Command line parsing utilities
2394
2395// Clear internal option table info structure.
2396
2398{
2399 set_stream();
2400
2401 ::plClearOpts();
2402}
2403
2404// Reset internal option table info structure.
2405
2407{
2408 set_stream();
2409
2410 ::plResetOpts();
2411}
2412
2413// Merge user option table into internal info structure.
2414
2416 const char **notes )
2417{
2418 set_stream();
2419
2420 return ::plMergeOpts( options, name, notes );
2421}
2422
2423// Set the strings used in usage and syntax messages.
2424
2425void plstream::SetUsage( char *program_string, char *usage_string )
2426{
2427 set_stream();
2428
2429 ::plSetUsage( program_string, usage_string );
2430}
2431
2432// Process input strings, treating them as an option and argument pair.
2433
2434PLINT plstream::setopt( const char *opt, const char *optarg )
2435{
2436 set_stream();
2437
2438 return ::plsetopt( opt, optarg );
2439}
2440
2441// Print usage & syntax message.
2442
2444{
2445 set_stream();
2446
2447 ::plOptUsage();
2448}
2449
2450// Miscellaneous
2451
2452// Set the output file pointer
2453
2454void plstream::gfile( FILE **p_file )
2455{
2456 set_stream();
2457
2458 ::plgfile( p_file );
2459}
2460
2461// Get the output file pointer
2462
2463void plstream::sfile( FILE *file )
2464{
2465 set_stream();
2466
2467 ::plsfile( file );
2468}
2469
2470
2471// Get the escape character for text strings.
2472
2473void plstream::gesc( char *p_esc )
2474{
2475 set_stream();
2476
2477 ::plgesc( p_esc );
2478}
2479
2480// Front-end to driver escape function.
2481
2482void plstream::cmd( PLINT op, void *ptr )
2483{
2484 set_stream();
2485
2486 ::pl_cmd( op, ptr );
2487}
2488
2489// Return full pathname for given file if executable
2490
2492{
2493 set_stream();
2494
2495 return plFindName( p );
2496}
2497
2498// Looks for the specified executable file according to usual search path.
2499
2500char *plstream::FindCommand( char *fn )
2501{
2502 set_stream();
2503
2504 return plFindCommand( fn );
2505}
2506
2507// Gets search name for file by concatenating the dir, subdir, and file
2508// name, allocating memory as needed.
2509
2510void plstream::GetName( char *dir, char *subdir, char *filename,
2511 char **filespec )
2512{
2513 set_stream();
2514
2515 plGetName( dir, subdir, filename, filespec );
2516}
2517
2518// Prompts human to input an integer in response to given message.
2519
2521{
2522 set_stream();
2523
2524 return plGetInt( s );
2525}
2526
2527// Prompts human to input a float in response to given message.
2528
2530{
2531 set_stream();
2532
2533 return plGetFlt( s );
2534}
2535
2536// Determine the Iliffe column vector of pointers to PLFLT row
2537// vectors corresponding to a 2D matrix of PLFLT's that is statically
2538// allocated.
2539
2541{
2542 set_stream();
2543
2544 ::plStatic2dGrid( zIliffe, zStatic, nx, ny );
2545}
2546
2547// Allocate a block of memory for use as a 2-d grid of PLFLT's organized
2548// as an Iliffe column vector of pointers to PLFLT row vectors.
2549
2551{
2552 set_stream();
2553
2554 ::plAlloc2dGrid( f, nx, ny );
2555}
2556
2557// Frees a block of memory allocated with plAlloc2dGrid().
2558
2560{
2561 set_stream();
2562
2563 ::plFree2dGrid( f, nx, ny );
2564}
2565
2566// Find the maximum and minimum of a 2d matrix allocated with plAllc2dGrid().
2567void plstream::MinMax2dGrid( const PLFLT * const *f, PLINT nx, PLINT ny,
2568 PLFLT *fmax, PLFLT *fmin )
2569{
2570 set_stream();
2571
2572 ::plMinMax2dGrid( f, nx, ny, fmax, fmin );
2573}
2574
2575// Functions for converting between HLS and RGB color space
2576
2577void plstream::hlsrgb( PLFLT h, PLFLT l, PLFLT s, PLFLT *p_r, PLFLT *p_g,
2578 PLFLT *p_b )
2579{
2580 set_stream();
2581
2582 ::c_plhlsrgb( h, l, s, p_r, p_g, p_b );
2583}
2584
2585void plstream::rgbhls( PLFLT r, PLFLT g, PLFLT b, PLFLT *p_h, PLFLT *p_l,
2586 PLFLT *p_s )
2587{
2588 set_stream();
2589
2590 ::c_plrgbhls( r, g, b, p_h, p_l, p_s );
2591}
2592
2593// Wait for right button mouse event and translate to world coordinates
2594
2596{
2597 set_stream();
2598
2599 return plGetCursor( gin );
2600}
2601
2602#ifdef PL_DEPRECATED
2603// Deprecated version using PLINT instead of bool
2604void
2605plstream::svect( const PLFLT *arrow_x, const PLFLT *arrow_y, PLINT npts, PLINT fill )
2606{
2607 set_stream();
2608
2609 plsvect( arrow_x, arrow_y, npts, (PLBOOL) fill );
2610}
2611
2612// Deprecated version using PLINT not bool
2613void plstream::cpstrm( plstream & pls, PLINT flags )
2614{
2615 set_stream();
2616
2617 plcpstrm( pls.stream, (PLBOOL) flags );
2618}
2619
2620// Deprecated version using PLINT not bool
2621void plstream::plot3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z,
2622 PLINT nx, PLINT ny, PLINT opt, PLINT side )
2623{
2624 set_stream();
2625
2626 ::plot3d( x, y, z, nx, ny, opt, (PLBOOL) side );
2627}
2628
2629// Deprecated version using PLINT not bool
2630void plstream::poly3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z,
2631 const PLINT *draw, PLINT ifcc )
2632{
2633 PLBOOL *loc_draw = new PLBOOL[n - 1];
2634 for ( int i = 0; i < n - 1; i++ )
2635 {
2636 loc_draw[i] = (PLBOOL) draw[i];
2637 }
2638
2639 set_stream();
2640
2641 plpoly3( n, x, y, z, loc_draw, (PLBOOL) ifcc );
2642
2643 delete [] loc_draw;
2644}
2645
2646// Deprecated version using PLINT instead of bool
2647void plstream::scmap1l( PLINT itype, PLINT npts, const PLFLT *intensity,
2648 const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3,
2649 const PLINT *alt_hue_path )
2650{
2651 PLBOOL *loc_alt_hue_path = NULL;
2652 if ( alt_hue_path != NULL )
2653 {
2654 loc_alt_hue_path = new PLBOOL[npts - 1];
2655 for ( int i = 0; i < npts - 1; i++ )
2656 {
2657 loc_alt_hue_path[i] = (PLBOOL) alt_hue_path[i];
2658 }
2659 }
2660
2661 set_stream();
2662
2663 plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_alt_hue_path );
2664
2665 if ( loc_alt_hue_path != NULL )
2666 delete [] loc_alt_hue_path;
2667}
2668
2669// Deprecated version using PLINT instead of bool
2670void
2671plstream::shade( const PLFLT * const *a, PLINT nx, PLINT ny,
2672 PLDEFINED_callback defined,
2673 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top,
2674 PLFLT shade_min, PLFLT shade_max,
2675 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
2676 PLINT min_color, PLFLT min_width,
2677 PLINT max_color, PLFLT max_width,
2678 PLFILL_callback fill, PLINT rectangular,
2679 PLTRANSFORM_callback pltr, PLPointer pltr_data )
2680{
2681 set_stream();
2682
2683 plshade( a, nx, ny, defined, left, right, bottom, top,
2684 shade_min, shade_max,
2685 sh_cmap, sh_color, sh_width,
2686 min_color, min_width, max_color, max_width,
2687 fill, (PLBOOL) rectangular, pltr, pltr_data );
2688}
2689
2690// Deprecated version using PLINT instead of bool
2691void
2692plstream::shades( const PLFLT * const *a, PLINT nx, PLINT ny,
2693 PLDEFINED_callback defined,
2694 PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
2695 const PLFLT *clevel, PLINT nlevel, PLFLT fill_width,
2696 PLINT cont_color, PLFLT cont_width,
2697 PLFILL_callback fill, PLINT rectangular,
2698 PLTRANSFORM_callback pltr, PLPointer pltr_data )
2699{
2700 set_stream();
2701
2702 plshades( a, nx, ny, defined, xmin, xmax, ymin, ymax,
2703 clevel, nlevel, fill_width, cont_color, cont_width,
2704 fill, (PLBOOL) rectangular, pltr, pltr_data );
2705}
2706
2707// Deprecated version using PLINT not bool
2708void
2710 PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max,
2711 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
2712 PLINT min_color, PLFLT min_width,
2713 PLINT max_color, PLFLT max_width,
2714 PLINT rectangular,
2715 Coord_Xformer *pcxf )
2716{
2717 set_stream();
2718
2719 int nx, ny;
2720 d.elements( nx, ny );
2721
2723 NULL, NULL,
2724 nx, ny,
2725 xmin, xmax, ymin, ymax, shade_min, shade_max,
2726 sh_cmap, sh_color, sh_width,
2727 min_color, min_width, max_color, max_width,
2728 plcallback::fill, rectangular != 0,
2729 Coord_Xform_evaluator, pcxf );
2730}
2731
2732// Deprecated version using PLINT not bool
2733void
2734plstream::fshade( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ),
2735 PLPointer f2eval_data,
2736 PLFLT ( *c2eval )( PLINT, PLINT, PLPointer ),
2737 PLPointer c2eval_data,
2738 PLINT nx, PLINT ny,
2739 PLFLT left, PLFLT right, PLFLT bottom, PLFLT top,
2740 PLFLT shade_min, PLFLT shade_max,
2741 PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
2742 PLINT min_color, PLFLT min_width,
2743 PLINT max_color, PLFLT max_width,
2744 PLFILL_callback fill, PLINT rectangular,
2745 PLTRANSFORM_callback pltr, PLPointer pltr_data )
2746{
2747 set_stream();
2748
2749 plfshade( f2eval, f2eval_data,
2750 c2eval, c2eval_data,
2751 nx, ny, left, right, bottom, top,
2752 shade_min, shade_max,
2753 sh_cmap, sh_color, sh_width,
2754 min_color, min_width, max_color, max_width,
2755 fill, (PLBOOL) rectangular, pltr, pltr_data );
2756}
2757
2758// Deprecated version using PLINT not bool
2759void plstream::spause( PLINT pause )
2760{
2761 set_stream();
2762
2763 plspause( (PLBOOL) pause );
2764}
2765
2766// Deprecated version using PLINT not bool
2767void plstream::stripc( PLINT *id, const char *xspec, const char *yspec,
2768 PLFLT xmin, PLFLT xmax, PLFLT xjump,
2769 PLFLT ymin, PLFLT ymax, PLFLT xlpos, PLFLT ylpos,
2770 PLINT y_ascl, PLINT acc, PLINT colbox, PLINT collab,
2771 const PLINT colline[], const PLINT styline[],
2772 const char *legline[], const char *labx,
2773 const char *laby, const char *labtop )
2774{
2775 set_stream();
2776
2777 plstripc( id, xspec, yspec, xmin, xmax, xjump, ymin, ymax, xlpos, ylpos,
2778 (PLBOOL) y_ascl, (PLBOOL) acc, colbox, collab, colline, styline,
2779 legline, labx, laby, labtop );
2780}
2781
2782// Deprecated version using PLINT not bool
2783void plstream::xormod( PLINT mode, PLINT *status )
2784{
2785 PLBOOL loc_status;
2786
2787 set_stream();
2788
2789 plxormod( (PLBOOL) mode, &loc_status );
2790
2791 *status = (PLINT) loc_status;
2792}
2793
2794#endif //PL_DEPRECATED
2795//--------------------------------------------------------------------------
2796// end of plstream.cc
2797//--------------------------------------------------------------------------
virtual void elements(int &nx, int &ny) const
Definition plstream.h:54
virtual void xform(PLFLT ox, PLFLT oy, PLFLT &nx, PLFLT &ny) const =0
stream_id
Definition plstream.h:39
@ Next
Definition plstream.h:39
@ Current
Definition plstream.h:39
@ Specific
Definition plstream.h:39
Coord_2d & xg
Definition plstream.h:78
Coord_2d & yg
Definition plstream.h:79
cxx_pltr2(Coord_2d &cx, Coord_2d &cy)
Definition plstream.cc:61
void xform(PLFLT x, PLFLT y, PLFLT &tx, PLFLT &ty) const
Definition plstream.cc:81
void wind(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax)
Definition plstream.cc:2253
void hist(PLINT n, const PLFLT *data, PLFLT datmin, PLFLT datmax, PLINT nbin, PLINT oldwin)
Definition plstream.cc:969
void spal0(const char *filename)
Definition plstream.cc:1942
void cmd(PLINT op, void *ptr)
Definition plstream.cc:2482
plstream(void)
Definition plstream.cc:289
void smin(PLFLT def, PLFLT scale)
Definition plstream.cc:1914
PLINT setopt(const char *opt, const char *optarg)
Definition plstream.cc:2434
void fill(PLINT n, const PLFLT *x, const PLFLT *y)
Definition plstream.cc:685
void gdiplt(PLFLT &xmin, PLFLT &ymin, PLFLT &xmax, PLFLT &ymax)
Definition plstream.cc:802
void sstrm(PLINT strm)
Definition plstream.cc:1969
void schr(PLFLT def, PLFLT scale)
Definition plstream.cc:1400
void vasp(PLFLT aspect)
Definition plstream.cc:2193
void join(PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2)
Definition plstream.cc:995
void scmap0a(const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *a, PLINT ncol0)
Definition plstream.cc:1454
void sdimap(PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax, PLFLT dimxpmm, PLFLT dimypmm)
Definition plstream.cc:1625
void scmap1(const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol1)
Definition plstream.cc:1463
void sdevdata(void *data)
Definition plstream.cc:1718
void stransform(PLTRANSFORM_callback coordinate_transform, PLPointer coordinate_transform_data)
Definition plstream.cc:2014
PLINT GetCursor(PLGraphicsIn *plg)
Definition plstream.cc:2595
void scmap1a(const PLINT *r, const PLINT *g, const PLINT *b, const PLFLT *a, PLINT ncol1)
Definition plstream.cc:1472
void smema(PLINT maxx, PLINT maxy, void *plotmem)
Definition plstream.cc:1905
PLINT FindName(char *p)
Definition plstream.cc:2491
char * FindCommand(char *fn)
Definition plstream.cc:2500
void griddata(const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT npts, const PLFLT *xg, PLINT nptsx, const PLFLT *yg, PLINT nptsy, PLFLT **zg, PLINT type, PLFLT data)
Definition plstream.cc:884
void env0(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis)
Definition plstream.cc:639
void svpa(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax)
Definition plstream.cc:2120
void mtex(const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text)
Definition plstream.cc:1197
void legend(PLFLT *p_legend_width, PLFLT *p_legend_height, PLINT opt, PLINT position, PLFLT x, PLFLT y, PLFLT plot_width, PLINT bg_color, PLINT bb_color, PLINT bb_style, PLINT nrow, PLINT ncolumn, PLINT nlegend, const PLINT *opt_array, PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, PLFLT text_justification, const PLINT *text_colors, const char *const *text, const PLINT *box_colors, const PLINT *box_patterns, const PLFLT *box_scales, const PLFLT *box_line_widths, const PLINT *line_colors, const PLINT *line_styles, const PLFLT *line_widths, const PLINT *symbol_colors, const PLFLT *symbol_scales, const PLINT *symbol_numbers, const char *const *symbols)
Definition plstream.cc:1014
virtual void set_stream(void)
Definition plstream.h:133
void replot(void)
Definition plstream.cc:1391
void arc(PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2, PLFLT rotate, PLBOOL fill)
Definition plstream.cc:373
void line3(PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z)
Definition plstream.cc:1080
void gdiori(PLFLT &rot)
Definition plstream.cc:793
void scompression(PLINT compression)
Definition plstream.cc:1588
void fshade(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, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, bool rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
Definition plstream.cc:1852
void did2pc(PLFLT &xmin, PLFLT &ymin, PLFLT &xmax, PLFLT &ymax)
Definition plstream.cc:588
void ClearOpts(void)
Definition plstream.cc:2397
void gspa(PLFLT &xmin, PLFLT &xmax, PLFLT &ymin, PLFLT &ymax)
Definition plstream.cc:895
void sfnam(const char *fnam)
Definition plstream.cc:1709
void scol0(PLINT icol0, PLINT r, PLINT g, PLINT b)
Definition plstream.cc:1543
void gcolbg(PLINT &r, PLINT &g, PLINT &b)
Definition plstream.cc:757
void text(void)
Definition plstream.cc:2174
void gfont(PLINT &family, PLINT &style, PLINT &weight)
Definition plstream.cc:838
void star(PLINT nx, PLINT ny)
Definition plstream.cc:1996
static PLINT active_streams
Definition plstream.h:124
void scolbg(PLINT r, PLINT g, PLINT b)
Definition plstream.cc:1561
void plot3d(const PLFLT *x, const PLFLT *y, const PLFLT *const *z, PLINT nx, PLINT ny, PLINT opt, bool side)
Definition plstream.cc:1243
PLINT GetInt(char *s)
Definition plstream.cc:2520
void gfnam(char *fnam)
Definition plstream.cc:829
void mtex3(const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text)
Definition plstream.cc:1207
void gra(void)
Definition plstream.cc:866
void shade(const PLFLT *const *a, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, bool rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
Definition plstream.cc:1737
void configtime(PLFLT scale, PLFLT offset1, PLFLT offset2, PLINT ccontrol, PLBOOL ifbtime_offset, PLINT year, PLINT month, PLINT day, PLINT hour, PLINT min, PLFLT sec)
Definition plstream.cc:524
void Static2dGrid(PLFLT_NC_MATRIX zIliffe, PLFLT_VECTOR zStatic, PLINT nx, PLINT ny)
Definition plstream.cc:2540
void lsty(PLINT lin)
Definition plstream.cc:1089
void gesc(char *p_esc)
Definition plstream.cc:2473
void pat(PLINT nlin, const PLINT *inc, const PLINT *del)
Definition plstream.cc:1288
void sfam(PLINT fam, PLINT num, PLINT bmax)
Definition plstream.cc:1691
PLFLT randd(void)
Definition plstream.cc:2284
PLFLT GetFlt(char *s)
Definition plstream.cc:2529
void vpor(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax)
Definition plstream.cc:2213
void psty(PLINT patt)
Definition plstream.cc:1351
virtual ~plstream(void)
Definition plstream.cc:348
void gradient(PLINT n, const PLFLT *x, const PLFLT *y, PLFLT angle)
Definition plstream.cc:876
void stripd(PLINT id)
Definition plstream.cc:2075
void Free2dGrid(PLFLT **f, PLINT nx, PLINT ny)
Definition plstream.cc:2559
void meshc(const PLFLT *x, const PLFLT *y, const PLFLT *const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel)
Definition plstream.cc:1178
void ctime(PLINT year, PLINT month, PLINT day, PLINT hour, PLINT min, PLFLT sec, PLFLT &ctime)
Definition plstream.cc:577
void gfam(PLINT &fam, PLINT &num, PLINT &bmax)
Definition plstream.cc:820
void w3d(PLFLT basex, PLFLT basey, PLFLT height, PLFLT xmin0, PLFLT xmax0, PLFLT ymin0, PLFLT ymax0, PLFLT zmin0, PLFLT zmax0, PLFLT alt, PLFLT az)
Definition plstream.cc:2232
void sdiplt(PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax)
Definition plstream.cc:1645
void string(PLINT n, const PLFLT *x, const PLFLT *y, const char *string)
Definition plstream.cc:2027
void vect(const PLFLT *const *u, const PLFLT *const *v, PLINT nx, PLINT ny, PLFLT scale, PLTRANSFORM_callback pltr, PLPointer pltr_data)
Definition plstream.cc:382
void sym(PLINT n, const PLFLT *x, const PLFLT *y, PLINT code)
Definition plstream.cc:2156
void col0(PLINT icol0)
Definition plstream.cc:483
void scmap1l(bool itype, PLINT npts, const PLFLT *intensity, const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const bool *alt_hue_path=NULL)
Definition plstream.cc:1482
void gvpw(PLFLT &xmin, PLFLT &xmax, PLFLT &ymin, PLFLT &ymax)
Definition plstream.cc:933
void scmap1n(PLINT ncol1)
Definition plstream.cc:1418
void mapfill(PLMAPFORM_callback mapform, const char *name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, const PLINT *plotentries, PLINT nplotentries)
Definition plstream.cc:1144
void gcolbga(PLINT &r, PLINT &g, PLINT &b, PLFLT &a)
Definition plstream.cc:766
void sdiplz(PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax)
Definition plstream.cc:1654
void timefmt(const char *fmt)
Definition plstream.cc:2183
void sxwin(PLINT window_id)
Definition plstream.cc:2138
void spage(PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, PLINT xoff, PLINT yoff)
Definition plstream.cc:1932
void poin3(PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT code)
Definition plstream.cc:1315
void sdiori(PLFLT rot)
Definition plstream.cc:1636
void prec(PLINT setp, PLINT prec)
Definition plstream.cc:1342
void width(PLFLT width)
Definition plstream.cc:2244
void gFileDevs(const char ***p_menustr, const char ***p_devname, int *p_ndev)
Definition plstream.cc:2295
void meridians(PLMAPFORM_callback mapform, PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
Definition plstream.cc:1155
void sdev(const char *devname)
Definition plstream.cc:1597
void ptex3(PLFLT wx, PLFLT wy, PLFLT wz, PLFLT dx, PLFLT dy, PLFLT dz, PLFLT sx, PLFLT sy, PLFLT sz, PLFLT just, const char *text)
Definition plstream.cc:1370
void fill3(PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z)
Definition plstream.cc:694
void col(PLcolor c)
Definition plstream.cc:492
PLINT parseopts(int *p_argc, char **argv, PLINT mode)
Definition plstream.cc:1279
void env(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis)
Definition plstream.cc:628
void scolor(PLINT color)
Definition plstream.cc:1579
void gdev(char *devname)
Definition plstream.cc:1606
void spal1(const char *filename, bool interpolate=true)
Definition plstream.cc:1951
void GetName(char *dir, char *subdir, char *filename, char **filespec)
Definition plstream.cc:2510
void mapstring(PLMAPFORM_callback mapform, const char *name, const char *string, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, const PLINT *plotentries, PLINT nplotentries)
Definition plstream.cc:1120
PLINT stream
Definition plstream.h:122
void sxax(PLINT digmax, PLINT digits)
Definition plstream.cc:2129
void ssym(PLFLT def, PLFLT scale)
Definition plstream.cc:1987
void btime(PLINT &year, PLINT &month, PLINT &day, PLINT &hour, PLINT &min, PLFLT &sec, PLFLT ctime)
Definition plstream.cc:454
void smem(PLINT maxx, PLINT maxy, void *plotmem)
Definition plstream.cc:1896
void gzax(PLINT &digmax, PLINT &digits)
Definition plstream.cc:960
void stripa(PLINT id, PLINT pen, PLFLT x, PLFLT y)
Definition plstream.cc:2066
void sesc(char esc)
Definition plstream.cc:1663
void font(PLINT ifont)
Definition plstream.cc:712
void sfont(PLINT family, PLINT style, PLINT weight)
Definition plstream.cc:1727
void colorbar(PLFLT *p_colorbar_width, PLFLT *p_colorbar_height, PLINT opt, PLINT position, PLFLT x, PLFLT y, PLFLT x_length, PLFLT y_length, PLINT bg_color, PLINT bb_color, PLINT bb_style, PLFLT low_cap_color, PLFLT high_cap_color, PLINT cont_color, PLFLT cont_width, PLINT n_labels, PLINT *label_opts, const char *const *label, PLINT n_axes, const char *const *axis_opts, PLFLT *ticks, PLINT *sub_ticks, PLINT *n_values, const PLFLT *const *values)
Definition plstream.cc:1039
void col1(PLFLT c)
Definition plstream.cc:501
void fontld(PLINT fnt)
Definition plstream.cc:721
void setcontlabelformat(PLINT lexp, PLINT sigdig)
Definition plstream.cc:1682
void gfci(PLUNICODE &pfci)
Definition plstream.cc:811
void scmap0n(PLINT ncol0)
Definition plstream.cc:1409
void gdidev(PLFLT &mar, PLFLT &aspect, PLFLT &jx, PLFLT &jy)
Definition plstream.cc:784
void dip2dc(PLFLT &xmin, PLFLT &ymin, PLFLT &xmax, PLFLT &ymax)
Definition plstream.cc:598
void box3(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)
Definition plstream.cc:442
void sKeyEH(void(*KeyEH)(PLGraphicsIn *, void *, int *), void *KeyEH_data)
Definition plstream.cc:2305
PLINT translatecursor(PLGraphicsIn *gin)
Definition plstream.cc:1382
void styl(PLINT nms, const PLINT *mark, const PLINT *space)
Definition plstream.cc:2111
void vpas(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect)
Definition plstream.cc:2203
void map(PLMAPFORM_callback mapform, const char *name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy)
Definition plstream.cc:1098
void poin(PLINT n, const PLFLT *x, const PLFLT *y, PLINT code)
Definition plstream.cc:1306
void erry(PLINT n, const PLFLT *x, const PLFLT *ymin, const PLFLT *ymax)
Definition plstream.cc:667
void slabelfunc(PLLABEL_FUNC_callback label_func, PLPointer label_data)
Definition plstream.cc:1878
void sexit(int(*handler)(const char *))
Definition plstream.cc:2324
void Alloc2dGrid(PLFLT_NC_MATRIX *f, PLINT nx, PLINT ny)
Definition plstream.cc:2550
void ssub(PLINT nx, PLINT ny)
Definition plstream.cc:1978
void szax(PLINT digmax, PLINT digits)
Definition plstream.cc:2165
void seed(unsigned int s)
Definition plstream.cc:2275
void setcontlabelparam(PLFLT offset, PLFLT size, PLFLT spacing, PLINT active)
Definition plstream.cc:1672
void sError(PLINT *errcode, char *errmsg)
Definition plstream.cc:2315
void bin(PLINT nbin, const PLFLT *x, const PLFLT *y, PLINT center)
Definition plstream.cc:412
void axes(PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub)
Definition plstream.cc:402
void gxax(PLINT &digmax, PLINT &digits)
Definition plstream.cc:942
void ptex(PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, const char *text)
Definition plstream.cc:1360
void lab(const char *xlabel, const char *ylabel, const char *tlabel)
Definition plstream.cc:1004
PLINT MergeOpts(PLOptionTable *options, const char *name, const char **notes)
Definition plstream.cc:2415
void rgbhls(PLFLT r, PLFLT g, PLFLT b, PLFLT *p_h, PLFLT *p_l, PLFLT *p_s)
Definition plstream.cc:2585
void cpstrm(plstream &pls, bool flags)
Definition plstream.cc:569
void scol0a(PLINT icol0, PLINT r, PLINT g, PLINT b, PLFLT a)
Definition plstream.cc:1552
void xormod(bool mode, bool *status)
Definition plstream.cc:2262
void hlsrgb(PLFLT h, PLFLT l, PLFLT s, PLFLT *p_r, PLFLT *p_g, PLFLT *p_b)
Definition plstream.cc:2577
void init(void)
Definition plstream.cc:981
void adv(PLINT page)
Definition plstream.cc:365
void gfile(FILE **p_file)
Definition plstream.cc:2454
void line(PLINT n, const PLFLT *x, const PLFLT *y)
Definition plstream.cc:1071
void gcol0(PLINT icol0, PLINT &r, PLINT &g, PLINT &b)
Definition plstream.cc:739
void fcont(PLFLT(*f2eval)(PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel, PLTRANSFORM_callback pltr, PLPointer pltr_data)
Definition plstream.cc:554
void svect(const PLFLT *arrow_x=NULL, const PLFLT *arrow_y=NULL, PLINT npts=0, bool fill=false)
Definition plstream.cc:391
void scmap0(const PLINT *r, const PLINT *g, const PLINT *b, PLINT ncol0)
Definition plstream.cc:1445
void cont(const PLFLT *const *f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel, PLTRANSFORM_callback pltr, PLPointer pltr_data)
Definition plstream.cc:540
void smaj(PLFLT def, PLFLT scale)
Definition plstream.cc:1887
void box(const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub)
Definition plstream.cc:430
void path(PLINT n, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2)
Definition plstream.cc:1297
void glevel(PLINT &p_level)
Definition plstream.cc:847
void MinMax2dGrid(PLFLT_MATRIX f, PLINT nx, PLINT ny, PLFLT *fmax, PLFLT *fmin)
Definition plstream.cc:2567
void scmap1_range(PLFLT min_color, PLFLT max_color)
Definition plstream.cc:1427
void plot3dcl(const PLFLT *x, const PLFLT *y, const PLFLT *const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax)
Definition plstream.cc:1265
void image(const PLFLT *const *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)
Definition plstream.cc:2085
void sori(PLINT ori)
Definition plstream.cc:1923
void stripc(PLINT *id, const char *xspec, const char *yspec, PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, PLFLT xlpos, PLFLT ylpos, bool y_ascl, bool acc, PLINT colbox, PLINT collab, const PLINT colline[], const PLINT styline[], const char *legline[], const char *labx, const char *laby, const char *labtop)
Definition plstream.cc:2047
void imagefr(const PLFLT *const *data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT valuemin, PLFLT valuemax, PLTRANSFORM_callback pltr, PLPointer pltr_data)
Definition plstream.cc:2098
void poly3(PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const bool *draw, bool ifcc)
Definition plstream.cc:1324
void gcmap1_range(PLFLT &min_color, PLFLT &max_color)
Definition plstream.cc:1436
void surf3d(const PLFLT *x, const PLFLT *y, const PLFLT *const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel)
Definition plstream.cc:1217
void scmap1la(bool itype, PLINT npts, const PLFLT *intensity, const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *a, const bool *alt_hue_path=NULL)
Definition plstream.cc:1508
void calc_world(PLFLT rx, PLFLT ry, PLFLT &wx, PLFLT &wy, PLINT &window)
Definition plstream.cc:464
void eop(void)
Definition plstream.cc:649
void surf3dl(const PLFLT *x, const PLFLT *y, const PLFLT *const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax)
Definition plstream.cc:1229
void spause(bool pause)
Definition plstream.cc:1960
void shades(const PLFLT *const *a, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, const PLFLT *clevel, PLINT nlevel, PLFLT fill_width, PLINT cont_color, PLFLT cont_width, PLFILL_callback fill, bool rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
Definition plstream.cc:1757
void gver(char *p_ver)
Definition plstream.cc:915
void gcol0a(PLINT icol0, PLINT &r, PLINT &g, PLINT &b, PLFLT &a)
Definition plstream.cc:748
void bop(void)
Definition plstream.cc:421
void lightsource(PLFLT x, PLFLT y, PLFLT z)
Definition plstream.cc:1062
void string3(PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const char *string)
Definition plstream.cc:2039
void sfile(FILE *file)
Definition plstream.cc:2463
void syax(PLINT digmax, PLINT digits)
Definition plstream.cc:2147
void maptex(PLMAPFORM_callback mapform, const char *name, PLFLT dx, PLFLT dy, PLFLT just, const char *text, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT plotentry)
Definition plstream.cc:1132
void famadv(void)
Definition plstream.cc:676
void sdidev(PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy)
Definition plstream.cc:1616
void gchr(PLFLT &p_def, PLFLT &p_ht)
Definition plstream.cc:730
void vsta(void)
Definition plstream.cc:2223
void sfci(PLUNICODE fci)
Definition plstream.cc:1700
PLFLT f2evalr(PLINT ix, PLINT iy, PLPointer plf2eval_data)
Definition plstream.cc:2386
void mesh(const PLFLT *x, const PLFLT *y, const PLFLT *const *z, PLINT nx, PLINT ny, PLINT opt)
Definition plstream.cc:1168
void gyax(PLINT &digmax, PLINT &digits)
Definition plstream.cc:951
void flush(void)
Definition plstream.cc:703
void plot3dc(const PLFLT *x, const PLFLT *y, const PLFLT *const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel)
Definition plstream.cc:1253
void errx(PLINT n, const PLFLT *xmin, const PLFLT *xmax, const PLFLT *y)
Definition plstream.cc:658
void gcompression(PLINT &compression)
Definition plstream.cc:775
void mapline(PLMAPFORM_callback mapform, const char *name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, const PLINT *plotentries, PLINT nplotentries)
Definition plstream.cc:1109
void gvpd(PLFLT &xmin, PLFLT &xmax, PLFLT &ymin, PLFLT &ymax)
Definition plstream.cc:924
void scolbga(PLINT r, PLINT g, PLINT b, PLFLT a)
Definition plstream.cc:1570
void clear(void)
Definition plstream.cc:474
void OptUsage(void)
Definition plstream.cc:2443
void gpage(PLFLT &xp, PLFLT &yp, PLINT &xleng, PLINT &yleng, PLINT &xoff, PLINT &yoff)
Definition plstream.cc:856
void start(const char *devname, PLINT nx, PLINT ny)
Definition plstream.cc:2005
PLFLT f2eval2(PLINT ix, PLINT iy, PLPointer plf2eval_data)
Definition plstream.cc:2366
PLFLT f2eval(PLINT ix, PLINT iy, PLPointer plf2eval_data)
Definition plstream.cc:2376
void SetUsage(char *program_string, char *usage_string)
Definition plstream.cc:2425
void ResetOpts(void)
Definition plstream.cc:2406
PLDLLIMPEXP_CXX void tr2(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plstream.cc:272
PLDLLIMPEXP_CXX void tr2p(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plstream.cc:281
PLDLLIMPEXP_CXX void fill(PLINT n, const PLFLT *x, const PLFLT *y)
Definition plstream.cc:246
PLDLLIMPEXP_CXX void tr0(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plstream.cc:255
PLDLLIMPEXP_CXX void tr1(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plstream.cc:263
#define min(x, y)
Definition nnpi.c:87
void plOptUsage(void)
Definition plargs.c:1304
void plClearOpts(void)
Definition plargs.c:830
void plResetOpts(void)
Definition plargs.c:843
void plSetUsage(PLCHAR_VECTOR program_string, PLCHAR_VECTOR usage_string)
Definition plargs.c:1287
void pltr2p(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plcont.c:1113
void pltr2(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plcont.c:941
void plfcont(PLF2EVAL_callback f2eval, PLPointer f2eval_data, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT_VECTOR clevel, PLINT nlevel, PLTRANSFORM_callback pltr, PLPointer pltr_data)
Definition plcont.c:535
void pltr1(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plcont.c:874
void pltr0(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer PL_UNUSED(pltr_data))
Definition plcont.c:858
void c_plend(void)
Definition plcore.c:2484
void pldip2dc(PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax)
Definition plcore.c:1737
void c_plssub(PLINT nx, PLINT ny)
Definition plcore.c:3617
void plsxwin(PLINT window_id)
Definition plcore.c:3978
void plsError(PLINT *errcode, char *errmsg)
Definition plcore.c:3753
void c_plend1(void)
Definition plcore.c:2542
void plsdevdata(void *data)
Definition plcore.c:3844
void plsfile(FILE *file)
Definition plcore.c:3802
void c_plsstrm(PLINT strm)
Definition plcore.c:2621
void c_plflush(void)
Definition plcore.c:2230
void c_plgstrm(PLINT *p_strm)
Definition plcore.c:2652
void pldid2pc(PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax)
Definition plcore.c:1691
void plgfile(FILE **p_file)
Definition plcore.c:3794
void c_plmkstrm(PLINT *p_strm)
Definition plcore.c:2671
void plgesc(char *p_esc)
Definition plcore.c:3914
void plgFileDevs(const char ***p_menustr, const char ***p_devname, int *p_ndev)
Definition plcore.c:3530
void c_plsdev(PLCHAR_VECTOR devname)
Definition plcore.c:3640
void c_plsfnam(PLCHAR_VECTOR fnam)
Definition plcore.c:3830
void plsKeyEH(void(*KeyEH)(PLGraphicsIn *, void *, int *), void *KeyEH_data)
Definition plcore.c:3715
static PLStream * pls[PL_NSTREAMS]
Definition plcore.h:88
void plsexit(int(*handler)(PLCHAR_VECTOR))
Definition plctrl.c:1987
PLFLT plGetFlt(PLCHAR_VECTOR s)
Definition plctrl.c:2945
void c_plrgbhls(PLFLT r, PLFLT g, PLFLT b, PLFLT *p_h, PLFLT *p_l, PLFLT *p_s)
Definition plctrl.c:1294
char * plFindCommand(PLCHAR_VECTOR fn)
Definition plctrl.c:2146
PLINT plFindName(char *p)
Definition plctrl.c:2432
void plGetName(PLCHAR_VECTOR dir, PLCHAR_VECTOR subdir, PLCHAR_VECTOR filename, char **filespec)
Definition plctrl.c:2453
void pl_cmd(PLINT op, void *ptr)
Definition plctrl.c:2118
void c_plscolbg(PLINT r, PLINT g, PLINT b)
Definition plctrl.c:229
PLINT plGetInt(PLCHAR_VECTOR s)
Definition plctrl.c:2910
void c_plhlsrgb(PLFLT h, PLFLT l, PLFLT s, PLFLT *p_r, PLFLT *p_g, PLFLT *p_b)
Definition plctrl.c:1261
void plFree2dGrid(PLFLT **f, PLINT nx, PLINT PL_UNUSED(ny))
Definition plmem.c:116
void plStatic2dGrid(PLFLT_NC_MATRIX zIliffe, PLFLT_VECTOR zStatic, PLINT nx, PLINT ny)
Definition plmem.c:61
void plMinMax2dGrid(PLFLT_MATRIX f, PLINT nx, PLINT ny, PLFLT *fnmax, PLFLT *fnmin)
Definition plmem.c:141
void plAlloc2dGrid(PLFLT ***f, PLINT nx, PLINT ny)
Definition plmem.c:91
PLINT plTranslateCursor(PLGraphicsIn *plg)
Definition plpage.c:259
PLINT plGetCursor(PLGraphicsIn *plg)
Definition plpage.c:244
#define plgfci
Definition plplot.h:735
#define plgstrm
Definition plplot.h:744
#define plpat
Definition plplot.h:779
#define plschr
Definition plplot.h:790
#define plfontld
Definition plplot.h:721
#define plpath
Definition plplot.h:761
#define plerry
Definition plplot.h:715
#define plsfam
Definition plplot.h:816
#define plsmaj
Definition plplot.h:826
#define plsmin
Definition plplot.h:829
#define pleop
Definition plplot.h:713
#define plimage
Definition plplot.h:753
#define plstransform
Definition plplot.h:840
#define plmap
Definition plplot.h:764
#define plfill
Definition plplot.h:717
#define plvpas
Definition plplot.h:859
#define plgdiplt
Definition plplot.h:732
#define plerrx
Definition plplot.h:714
#define plinit
Definition plplot.h:755
#define plscmap1l
Definition plplot.h:796
#define plsori
Definition plplot.h:830
#define plbox3
Definition plplot.h:698
#define plmapfill
Definition plplot.h:768
#define plcol1
Definition plplot.h:703
#define pltimefmt
Definition plplot.h:856
PLUINT PLUNICODE
Definition plplot.h:201
#define plmaptex
Definition plplot.h:767
#define plvect
Definition plplot.h:858
#define plgchr
Definition plplot.h:722
float PLFLT
Definition plplot.h:163
#define pllegend
Definition plplot.h:758
#define plsyax
Definition plplot.h:852
#define plgver
Definition plplot.h:745
#define plscolbg
Definition plplot.h:802
#define plpsty
Definition plplot.h:784
#define plgfont
Definition plplot.h:737
#define plenv
Definition plplot.h:711
#define pllightsource
Definition plplot.h:759
void(* PLMAPFORM_callback)(PLINT n, PLFLT_NC_VECTOR x, PLFLT_NC_VECTOR y)
Definition plplot.h:256
void(* PLTRANSFORM_callback)(PLFLT x, PLFLT y, PLFLT_NC_SCALAR xp, PLFLT_NC_SCALAR yp, PLPointer data)
Definition plplot.h:257
#define plsmema
Definition plplot.h:828
#define plpoin3
Definition plplot.h:781
#define plgspa
Definition plplot.h:743
#define plscol0
Definition plplot.h:800
#define plptex
Definition plplot.h:785
#define plbop
Definition plplot.h:696
#define plgdidev
Definition plplot.h:730
#define plpoin
Definition plplot.h:780
#define plptex3
Definition plplot.h:786
#define plstripd
Definition plplot.h:845
#define plhist
Definition plplot.h:751
#define plmapline
Definition plplot.h:765
#define plgfnam
Definition plplot.h:736
#define plgdiori
Definition plplot.h:731
#define plszax
Definition plplot.h:854
#define plsmem
Definition plplot.h:827
#define plstripa
Definition plplot.h:843
#define plgxax
Definition plplot.h:748
#define plgra
Definition plplot.h:740
#define plenv0
Definition plplot.h:712
PLINT(* PLDEFINED_callback)(PLFLT x, PLFLT y)
Definition plplot.h:261
#define plspal1
Definition plplot.h:833
#define plstring3
Definition plplot.h:842
#define plxormod
Definition plplot.h:865
#define plspause
Definition plplot.h:834
#define plgdev
Definition plplot.h:729
#define plgradient
Definition plplot.h:741
#define plspal0
Definition plplot.h:832
#define plcalc_world
Definition plplot.h:700
#define plwidth
Definition plplot.h:863
#define pllab
Definition plplot.h:757
const PLFLT * PLFLT_VECTOR
Definition plplot.h:244
#define plsurf3d
Definition plplot.h:847
#define plsurf3dl
Definition plplot.h:848
#define plvasp
Definition plplot.h:857
#define plscmap0n
Definition plplot.h:793
#define plmtex3
Definition plplot.h:774
#define plctime
Definition plplot.h:708
#define plclear
Definition plplot.h:701
#define plsvpa
Definition plplot.h:850
#define plw3d
Definition plplot.h:862
#define plot3dcl
Definition plplot.h:777
#define plscmap1n
Definition plplot.h:798
#define plgvpd
Definition plplot.h:746
#define pl_setcontlabelformat
Definition plplot.h:690
#define plsdev
Definition plplot.h:806
#define plconfigtime
Definition plplot.h:705
#define plscolbga
Definition plplot.h:803
#define plscmap1
Definition plplot.h:794
#define plsdiplz
Definition plplot.h:811
#define plmapstring
Definition plplot.h:766
#define plot3d
Definition plplot.h:775
#define plsesc
Definition plplot.h:814
#define plarc
Definition plplot.h:693
#define plgvpw
Definition plplot.h:747
#define pltext
Definition plplot.h:855
#define plstring
Definition plplot.h:841
PLFLT ** PLFLT_NC_MATRIX
Definition plplot.h:248
#define plsdiori
Definition plplot.h:809
#define plcont
Definition plplot.h:706
#define plspage
Definition plplot.h:831
#define plaxes
Definition plplot.h:694
#define pllsty
Definition plplot.h:763
#define plslabelfunc
Definition plplot.h:825
#define plshades
Definition plplot.h:824
#define plglevel
Definition plplot.h:738
#define plscompression
Definition plplot.h:805
#define plfamadv
Definition plplot.h:716
#define plfont
Definition plplot.h:720
#define plscmap0a
Definition plplot.h:792
#define plgcol0a
Definition plplot.h:725
#define plscmap1_range
Definition plplot.h:799
#define plmeshc
Definition plplot.h:771
#define plshade
Definition plplot.h:820
#define plsym
Definition plplot.h:853
#define plscmap1a
Definition plplot.h:795
#define plscmap0
Definition plplot.h:791
#define plgriddata
Definition plplot.h:742
#define plstripc
Definition plplot.h:844
#define pl_setcontlabelparam
Definition plplot.h:691
#define plsvect
Definition plplot.h:849
#define plstyl
Definition plplot.h:846
#define plline
Definition plplot.h:760
#define pljoin
Definition plplot.h:756
#define plgzax
Definition plplot.h:750
#define plsstrm
Definition plplot.h:835
#define plscmap1la
Definition plplot.h:797
#define plssym
Definition plplot.h:837
#define plscolor
Definition plplot.h:804
#define plcol0
Definition plplot.h:702
#define plsdiplt
Definition plplot.h:810
#define plcolorbar
Definition plplot.h:704
#define plvsta
Definition plplot.h:861
#define plmeridians
Definition plplot.h:769
void(* PLFILL_callback)(PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y)
Definition plplot.h:260
#define plot3dc
Definition plplot.h:776
#define plcpstrm
Definition plplot.h:707
#define plgcol0
Definition plplot.h:724
#define pladv
Definition plplot.h:692
#define plgcolbga
Definition plplot.h:727
#define plline3
Definition plplot.h:762
#define plprec
Definition plplot.h:783
#define plfill3
Definition plplot.h:718
#define plseed
Definition plplot.h:813
#define plgcompression
Definition plplot.h:728
#define plimagefr
Definition plplot.h:754
#define plsfont
Definition plplot.h:819
int PLINT
Definition plplot.h:181
#define plgfam
Definition plplot.h:734
#define plscol0a
Definition plplot.h:801
#define plrandd
Definition plplot.h:787
#define plbin
Definition plplot.h:695
#define plsdidev
Definition plplot.h:807
#define plsfnam
Definition plplot.h:818
void * PLPointer
Definition plplot.h:209
#define plwind
Definition plplot.h:864
#define plstar
Definition plplot.h:838
#define plmtex
Definition plplot.h:773
PLINT PLBOOL
Definition plplot.h:204
#define plsdimap
Definition plplot.h:808
#define plsfci
Definition plplot.h:817
#define plmesh
Definition plplot.h:770
#define plreplot
Definition plplot.h:788
#define plgcolbg
Definition plplot.h:726
#define plgcmap1_range
Definition plplot.h:723
#define plstart
Definition plplot.h:839
#define plsxax
Definition plplot.h:851
#define plbox
Definition plplot.h:697
#define plbtime
Definition plplot.h:699
#define plgyax
Definition plplot.h:749
#define plvpor
Definition plplot.h:860
#define plpoly3
Definition plplot.h:782
#define plgpage
Definition plplot.h:739
void(* PLLABEL_FUNC_callback)(PLINT axis, PLFLT value, PLCHAR_NC_VECTOR label, PLINT length, PLPointer data)
Definition plplot.h:258
#define plssub
Definition plplot.h:836
plgriddata(x, y, z, xg, yg, type, data)\n\ \n\ \n\ This function is used in example 21.\n\ \n\ \n\ \n\ SYNOPSIS:\n\ \n\ plgriddata(x, y, z, npts, xg, nptsx, yg, nptsy, zg, type, data)\n\ \n\ ARGUMENTS:\n\ \n\ x(PLFLT_VECTOR, input) : The input x vector.\n\ \n\ y(PLFLT_VECTOR, input) : The input y vector.\n\ \n\ z(PLFLT_VECTOR, input) : The input z vector. Each triple x[i],\n\ y[i], z[i] represents one data sample coordinate.\n\ \n\ npts(PLINT, input) : The number of data samples in the x, y and z\n\ vectors.\n\ \n\ xg(PLFLT_VECTOR, input) : A vector that specifies the grid spacing\n\ in the x direction. Usually xg has nptsx equally spaced values\n\ from the minimum to the maximum values of the x input vector.\n\ \n\ nptsx(PLINT, input) : The number of points in the xg vector.\n\ \n\ yg(PLFLT_VECTOR, input) : A vector that specifies the grid spacing\n\ in the y direction. Similar to the xg parameter.\n\ \n\ nptsy(PLINT, input) : The number of points in the yg vector.\n\ \n\ zg(PLFLT_NC_MATRIX, output) : The matrix of interpolated results\n\ where data lies in the grid specified by xg and yg. Therefore the\n\ zg matrix must be dimensioned\n\ nptsx by\n\ nptsy.\n\ \n\ type(PLINT, input) : The type of grid interpolation algorithm to\n\ use, which can be:GRID_CSA:Bivariate Cubic Spline approximation\n\ GRID_DTLI:Delaunay Triangulation Linear Interpolation\n\ GRID_NNI:Natural Neighbors Interpolation\n\ GRID_NNIDW:Nearest Neighbors Inverse Distance Weighted\n\ GRID_NNLI:Nearest Neighbors Linear Interpolation\n\ GRID_NNAIDW: Nearest Neighbors Around Inverse Distance\n\ Weighted\n\ For details of the algorithms read the source file plgridd.c.\n\ \n\ data(PLFLT, input) : Some gridding algorithms require extra data,\n\ which can be specified through this argument. Currently, for\n\ algorithm:GRID_NNIDW, data specifies the number of neighbors to\n\ use, the lower the value, the noisier(more local) the\n\ approximation is.\n\ GRID_NNLI, data specifies what a thin triangle is, in the\n\ range[1. .. 2.]. High values enable the usage of very thin\n\ triangles for interpolation, possibly resulting in error in\n\ the approximation.\n\ GRID_NNI, only weights greater than data will be accepted. If\n\ 0, all weights will be accepted.\n\ " zg
void(* label_func)(PLINT, PLFLT, char *, PLINT, PLPointer)
void plfshade(PLF2EVAL_callback f2eval, PLPointer f2eval_data, PLF2EVAL_callback c2eval, PLPointer c2eval_data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
Definition plshade.c:416
void Coord_Xform_evaluator(PLFLT ox, PLFLT oy, PLFLT *nx, PLFLT *ny, PLPointer p)
Definition plstream.cc:50
PLFLT Contourable_Data_evaluator(PLINT i, PLINT j, PLPointer p)
Definition plstream.cc:43
PLDLLIMPEXP_CXX PLFLT Contourable_Data_evaluator(PLINT i, PLINT j, PLPointer p)
Definition plstream.cc:43
PLDLLIMPEXP_CXX void Coord_Xform_evaluator(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
Definition plstream.cc:50
PLcolor
Definition plstream.h:42
static int sid
Definition plstripc.c:44
static int color
Definition ps.c:78
static int text
Definition ps.c:77
static char ** argv
Definition qt.cpp:49
static char errmsg[160]
Definition tclAPI.c:158
void mapform(PLINT n, PLFLT *x, PLFLT *y)
Definition tclAPI.c:3693
static PLOptionTable options[]
Definition tclMain.c:108
static const char * name
Definition tkMain.c:135