97 #ifdef unix // the old way
105 #if defined ( SX ) || \
106 ( defined ( _IBMR2 ) && defined ( _AIX ) ) || \
107 defined ( __hpux ) || \
109 defined ( CRAY ) || \
110 defined ( __convexc__ ) || \
111 ( defined ( __alpha ) && defined ( __osf__ ) ) // DEC Alpha AXP/OSF
120 #define PLARGS( a ) a
142 #if defined ( PL_DOUBLE ) || defined ( DOUBLE )
148 #if defined ( MSDOS )
171 #define PLESC_SET_RGB 1 // obsolete
172 #define PLESC_ALLOC_NCOL 2 // obsolete
173 #define PLESC_SET_LPB 3 // obsolete
174 #define PLESC_EXPOSE 4 // handle window expose
175 #define PLESC_RESIZE 5 // handle window resize
176 #define PLESC_REDRAW 6 // handle window redraw
177 #define PLESC_TEXT 7 // switch to text screen
178 #define PLESC_GRAPH 8 // switch to graphics screen
179 #define PLESC_FILL 9 // fill polygon
180 #define PLESC_DI 10 // handle DI command
181 #define PLESC_FLUSH 11 // flush output
182 #define PLESC_EH 12 // handle Window events
183 #define PLESC_GETC 13 // get cursor position
184 #define PLESC_SWIN 14 // set window parameters
185 #define PLESC_DOUBLEBUFFERING 15 // configure double buffering
186 #define PLESC_XORMOD 16 // jc: set xor mode
187 #define PLESC_SET_COMPRESSION 17 // AFR: set compression
188 #define PLESC_CLEAR 18 // RL: clear graphics region
189 #define PLESC_DASH 19 // RL: draw dashed line
193 #define PLSWIN_DEVICE 1 // device coordinates
194 #define PLSWIN_WORLD 2 // world coordinates
200 #define PL_OPT_ENABLED 0x0001 // Obsolete
201 #define PL_OPT_ARG 0x0002 // Option has an argment
202 #define PL_OPT_NODELETE 0x0004 // Don't delete after processing
203 #define PL_OPT_INVISIBLE 0x0008 // Make invisible
204 #define PL_OPT_DISABLED 0x0010 // Processing is disabled
208 #define PL_OPT_FUNC 0x0100 // Call handler function
209 #define PL_OPT_BOOL 0x0200 // Set *var = 1
210 #define PL_OPT_INT 0x0400 // Set *var = atoi(optarg)
211 #define PL_OPT_FLOAT 0x0800 // Set *var = atof(optarg)
212 #define PL_OPT_STRING 0x1000 // Set var = optarg
217 #define PL_PARSE_PARTIAL 0x0000 // For backward compatibility
218 #define PL_PARSE_FULL 0x0001 // Process fully & exit if error
219 #define PL_PARSE_QUIET 0x0002 // Don't issue messages
220 #define PL_PARSE_NODELETE 0x0004 // Don't delete options after
222 #define PL_PARSE_SHOWALL 0x0008 // Show invisible options
223 #define PL_PARSE_OVERRIDE 0x0010 // Obsolete
224 #define PL_PARSE_NOPROGRAM 0x0020 // Program name NOT in *argv[0]..
225 #define PL_PARSE_NODASH 0x0040 // Set if leading dash NOT required
226 #define PL_PARSE_SKIP 0x0080 // Skip over unrecognized args
230 #define plParseInternalOpts( a, b, c ) plparseopts( a, b, c )
231 #define plSetInternalOpt( a, b ) plSetOpt( a, b )
238 int ( *handler )(
char *,
char *,
void * );
265 #define PL_MAXWINDOWS 64 // Max number of windows/page tracked
269 PLFLT dxmi, dxma, dymi, dyma;
270 PLFLT wxmi, wxma, wymi, wyma;
279 unsigned int width, height;
285 #define PL_NOTSET ( -42 )
376 #define PLESC_DOUBLEBUFFERING_ENABLE 1
377 #define PLESC_DOUBLEBUFFERING_DISABLE 2
378 #define PLESC_DOUBLEBUFFERING_QUERY 3
436 #ifndef __PLSTUBS_H__ // i.e. do not expand this in the stubs
438 #define pl_setcontlabelformat c_pl_setcontlabelformat
439 #define pl_setcontlabelparam c_pl_setcontlabelparam
440 #define pladv c_pladv
441 #define plarc c_plarc
442 #define plaxes c_plaxes
443 #define plbin c_plbin
444 #define plbop c_plbop
445 #define plbox c_plbox
446 #define plbox3 c_plbox3
447 #define plbtime c_plbtime
448 #define plcalc_world c_plcalc_world
449 #define plclear c_plclear
450 #define plcol0 c_plcol0
451 #define plcol1 c_plcol1
452 #define plconfigtime c_plconfigtime
453 #define plcont c_plcont
454 #define plcpstrm c_plcpstrm
455 #define plctime c_plctime
456 #define plend c_plend
457 #define plend1 c_plend1
458 #define plenv c_plenv
459 #define plenv0 c_plenv0
460 #define pleop c_pleop
461 #define plerrx c_plerrx
462 #define plerry c_plerry
463 #define plfamadv c_plfamadv
464 #define plfill c_plfill
465 #define plfill3 c_plfill3
466 #define plflush c_plflush
467 #define plfont c_plfont
468 #define plfontld c_plfontld
469 #define plgchr c_plgchr
470 #define plgcol0 c_plgcol0
471 #define plgcol0a c_plgcol0a
472 #define plgcolbg c_plgcolbg
473 #define plgcolbga c_plgcolbga
474 #define plgcompression c_plgcompression
475 #define plgdev c_plgdev
476 #define plgdidev c_plgdidev
477 #define plgdiori c_plgdiori
478 #define plgdiplt c_plgdiplt
479 #define plgfam c_plgfam
480 #define plgfci c_plgfci
481 #define plgfnam c_plgfnam
482 #define plgfont c_plgfont
483 #define plglevel c_plglevel
484 #define plgpage c_plgpage
485 #define plgra c_plgra
486 #define plgradient c_plgradient
487 #define plgriddata c_plgriddata
488 #define plgspa c_plgspa
489 #define plgstrm c_plgstrm
490 #define plgver c_plgver
491 #define plgvpd c_plgvpd
492 #define plgvpw c_plgvpw
493 #define plgxax c_plgxax
494 #define plgyax c_plgyax
495 #define plgzax c_plgzax
496 #define plhist c_plhist
497 #define plhls c_plhls
498 #define plhlsrgb c_plhlsrgb
499 #define plimage c_plimage
500 #define plimagefr c_plimagefr
501 #define plinit c_plinit
502 #define pljoin c_pljoin
503 #define pllab c_pllab
504 #define pllightsource c_pllightsource
505 #define plline c_plline
506 #define plline3 c_plline3
507 #define pllsty c_pllsty
508 #define plmesh c_plmesh
509 #define plmeshc c_plmeshc
510 #define plmkstrm c_plmkstrm
511 #define plmtex c_plmtex
512 #define plmtex3 c_plmtex3
513 #define plot3d c_plot3d
514 #define plot3dc c_plot3dc
515 #define plparseopts c_plparseopts
516 #define plpat c_plpat
517 #define plpoin c_plpoin
518 #define plpoin3 c_plpoin3
519 #define plpoly3 c_plpoly3
520 #define plprec c_plprec
521 #define plpsty c_plpsty
522 #define plptex c_plptex
523 #define plptex3 c_plptex3
524 #define plrandd c_plrandd
525 #define plreplot c_plreplot
526 #define plrgb c_plrgb
527 #define plrgb1 c_plrgb1
528 #define plrgbhls c_plrgbhls
529 #define plschr c_plschr
530 #define plscmap0 c_plscmap0
531 #define plscmap0a c_plscmap0a
532 #define plscmap0n c_plscmap0n
533 #define plscmap1 c_plscmap1
534 #define plscmap1a c_plscmap1a
535 #define plscmap1l c_plscmap1l
536 #define plscmap1la c_plscmap1la
537 #define plscmap1n c_plscmap1n
538 #define plscol0 c_plscol0
539 #define plscol0a c_plscol0a
540 #define plscolbg c_plscolbg
541 #define plscolbga c_plscolbga
542 #define plscolor c_plscolor
543 #define plscompression c_plscompression
544 #define plsdev c_plsdev
545 #define plsdidev c_plsdidev
546 #define plsdimap c_plsdimap
547 #define plsdiori c_plsdiori
548 #define plsdiplt c_plsdiplt
549 #define plsdiplz c_plsdiplz
550 #define plseed c_plseed
551 #define plsesc c_plsesc
552 #define plsfam c_plsfam
553 #define plsfci c_plsfci
554 #define plsfnam c_plsfnam
555 #define plsfont c_plsfont
556 #define plshades c_plshades
557 #define plshade c_plshade
558 #define plshade1 c_plshade1
559 #define plslabelfunc c_plslabelfunc
560 #define plsmaj c_plsmaj
561 #define plsmin c_plsmin
562 #define plsori c_plsori
563 #define plspage c_plspage
564 #define plspal0 c_plspal0
565 #define plspal1 c_plspal1
566 #define plspause c_plspause
567 #define plsstrm c_plsstrm
568 #define plssub c_plssub
569 #define plssym c_plssym
570 #define plstar c_plstar
571 #define plstart c_plstart
572 #define plstripa c_plstripa
573 #define plstripc c_plstripc
574 #define plstripd c_plstripd
575 #define plstyl c_plstyl
576 #define plsurf3d c_plsurf3d
577 #define plsvect c_plsvect
578 #define plsvpa c_plsvpa
579 #define plsxax c_plsxax
580 #define plsyax c_plsyax
581 #define plsym c_plsym
582 #define plszax c_plszax
583 #define pltext c_pltext
584 #define pltimefmt c_pltimefmt
585 #define plvasp c_plvasp
586 #define plvect c_plvect
587 #define plvpas c_plvpas
588 #define plvpor c_plvpor
589 #define plvsta c_plvsta
590 #define plw3d c_plw3d
591 #define plwidth c_plwidth
592 #define plwind c_plwind
593 #define plxormod c_plxormod
595 #endif // __PLSTUBS_H__
601 #ifndef __PLSTUBS_H__ // i.e. do not expand this in the stubs
606 #define plcontf plfcont
607 #define Alloc2dGrid plAlloc2dGrid
608 #define Free2dGrid plFree2dGrid
610 #endif // __PLSTUBS_H__
657 const char *yopt,
const char *ylabel,
PLFLT ytick,
PLINT nsuby,
658 const char *zopt,
const char *zlabel,
PLFLT ztick,
PLINT nsubz );
693 void c_plconfigtime(
PLFLT scale,
PLFLT offset1,
PLFLT offset2,
PLINT ccontrol,
PLBOOL ifbtime_offset,
PLINT year,
PLINT month,
PLINT day,
PLINT hour,
PLINT min,
PLFLT sec );
727 *tx = *( (
PLFLT *) pltr_data + 0 ) * x + *( (
PLFLT *) pltr_data + 1 ) * y + *( (
PLFLT *) pltr_data + 2 );
728 *ty = *( (
PLFLT *) pltr_data + 3 ) * x + *( (
PLFLT *) pltr_data + 4 ) * y + *( (
PLFLT *) pltr_data + 5 );
733 #define f2c( f, ff, nx, ny ) \
735 ff = (PLFLT **) alloca( nx * sizeof ( PLFLT * ) ); \
736 for ( int i = 0; i < nx; i++ ) { \
737 ff[i] = (PLFLT *) alloca( ny * sizeof ( PLFLT ) ); \
738 for ( int j = 0; j < ny; j++ ) \
739 *( ff[i] + j ) = *( f + nx * j + i );}
746 f2c( f, ff, nx, ny );
747 c_plcont( ff, nx, ny, kx, lx, ky, ly, clevel, nlevel,
xform, tr );
755 f2c( f, ff, nx, ny );
756 c_plcont( ff, nx, ny, kx, lx, ky, ly, clevel, nlevel,
pltr0, NULL );
767 f2c( f, ff, nx, ny );
768 c_plcont( ff, nx, ny, kx, lx, ky, ly, clevel, nlevel,
pltr1, &grid1 );
777 f2c( xg, xgg, nx, ny );
f2c( yg, ygg, nx, ny );
779 grid2.
xg = xgg; grid2.
yg = ygg;
780 f2c( f, ff, nx, ny );
781 c_plcont( ff, nx, ny, kx, lx, ky, ly, clevel, nlevel,
pltr2, &grid2 );
790 f2c( xg, xgg, nx, ny );
f2c( yg, ygg, nx, ny );
792 grid2.
xg = xgg; grid2.
yg = ygg;
793 f2c( f, ff, nx, ny );
794 c_plcont( ff, nx, ny, kx, lx, ky, ly, clevel, nlevel,
pltr2, &grid2 );
948 f2c( zg, zgg, nptsx, nptsy );
949 plgriddata( x, y, z, npts, xg, nptsx, yg, nptsy, zgg, type, data );
950 for (
int i = 0; i < nptsx; i++ )
951 for (
int j = 0; j < nptsy; j++ )
952 *( zg + nptsx * j + i ) = zgg[i][j];
957 #define GRID_CSA 1 // Bivariate Cubic Spline approximation
958 #define GRID_DTLI 2 // Delaunay Triangulation Linear Interpolation
959 #define GRID_NNI 3 // Natural Neighbors Interpolation
960 #define GRID_NNIDW 4 // Nearest Neighbors Inverse Distance Weighted
961 #define GRID_NNLI 5 // Nearest Neighbors Linear Interpolation
962 #define GRID_NNAIDW 6 // Nearest Neighbors Around Inverse Distance Weighted
1019 void c_pllab(
const char *xlabel,
const char *ylabel,
const char *tlabel );
1043 f2c( z, zz, nx, ny );
1053 f2c( z, zz, nx, ny );
1054 c_plmeshc( x, y, zz, nx, ny, opt, clevel, nlevel );
1079 f2c( z, zz, nx, ny )
1080 c_plot3d( x, y, zz, nx, ny, opt, side );
1093 f2c( z, zz, nx, ny )
1094 c_plot3dc( x, y, zz, nx, ny, opt, clevel, nlevel );
1105 f2c( z, zz, nx, ny )
1106 c_plsurf3d( x, y, zz, nx, ny, opt, clevel, nlevel );
1127 c_plpoly3( n, x, y, z, draw, ( 1 - clockwise ) / 2 );
1144 void c_plptex3(
PLFLT wx,
PLFLT wy,
PLFLT wz,
PLFLT dx,
PLFLT dy,
PLFLT dz,
PLFLT sx,
PLFLT sy,
PLFLT sz,
PLFLT just,
const char *
text );
1236 void c_plsdev(
const char *devname );
1308 f2c( a, aa, nx, ny );
1309 c_plshade( aa, nx, ny, NULL, left, right, bottom, top,
1310 shade_min, shade_max, sh_cmap, sh_color, sh_width,
1311 min_color, min_width, max_color, max_width,
1328 f2c( a, aa, nx, ny );
1329 c_plshade( aa, nx, ny, NULL, left, right, bottom, top,
1330 shade_min, shade_max, sh_cmap, sh_color, sh_width,
1331 min_color, min_width, max_color, max_width,
1346 f2c( xg, xgg, nx, ny );
f2c( yg, ygg, nx, ny );
1348 grid2.
xg = xgg; grid2.
yg = ygg;
1349 f2c( a, aa, nx, ny );
1350 c_plshade( aa, nx, ny, NULL, left, right, bottom, top,
1351 shade_min, shade_max, sh_cmap, sh_color, sh_width,
1352 min_color, min_width, max_color, max_width,
1362 f2c( a, aa, nx, ny );
1363 c_plshades( aa, nx, ny, NULL, left, right, bottom, top,
1364 clevel, nlevel, fill_width, cont_color, cont_width,
1365 plfill, rectangular, NULL, NULL );
1374 f2c( a, aa, nx, ny );
1375 c_plshades( aa, nx, ny, NULL, left, right, bottom, top,
1376 clevel, nlevel, fill_width, cont_color, cont_width,
1390 f2c( a, aa, nx, ny );
1391 c_plshades( aa, nx, ny, NULL, left, right, bottom, top,
1392 clevel, nlevel, fill_width, cont_color, cont_width,
1404 f2c( xg, xgg, nx, ny );
f2c( yg, ygg, nx, ny );
1406 grid2.
xg = xgg; grid2.
yg = ygg;
1407 f2c( a, aa, nx, ny );
1408 c_plshades( aa, nx, ny, NULL, left, right, bottom, top,
1409 clevel, nlevel, fill_width, cont_color, cont_width,
1470 char *legline1,
char *legline2,
char *legline3,
char *legline4,
1471 char *labx,
char *laby,
char *labtop )
1474 legline[0] = legline1; legline[1] = legline2;
1475 legline[2] = legline3; legline[3] = legline4;
1476 c_plstripc(
id, xspec, yspec, xmin, xmax, xjump, ymin, ymax,
1477 xlpos, ylpos, y_ascl, acc, colbox, collab, colline, styline, legline,
1478 labx, laby, labtop );
1539 f2c( u, uu, nx, ny );
1540 f2c( v, vv, nx, ny );
1550 f2c( u, uu, nx, ny );
1551 f2c( v, vv, nx, ny );
1559 f2c( xg, xgg, nx, ny );
f2c( yg, ygg, nx, ny );
1561 grid2.
xg = xgg; grid2.
yg = ygg;
1562 f2c( u, uu, nx, ny );
1563 f2c( v, vv, nx, ny );
1602 void plgFileDevs(
char ***p_menustr,
char ***p_devname,
int *p_ndev );
1606 void plgDevs(
char ***p_menustr,
char ***p_devname,
int *p_ndev );
1660 void plSetUsage(
char *program_string,
char *usage_string );
1678 void plgfile( FILE **p_file );
1686 void plgesc(
char *p_esc );
1703 void plGetName(
char *dir,
char *subdir,
char *filename,
char **filespec );
1727 int my_plGetCursor(
int *state,
int *keysym,
int *button,
char *
string,
int *pX,
int *pY,
PLFLT *dX,
PLFLT *dY,
PLFLT *wX,
PLFLT *wY,
int *subwin )
1732 *pX = gin.
pX; *pY = gin.
pY; *dX = gin.
dX; *dY = gin.
dY; *wX = gin.
wX; *wY = gin.
wY;
1744 gin.
dX = x_in; gin.
dY = y_in;
1746 *x = gin.
wX; *y = gin.
wY;
1760 f2c( a, aa, nx, ny );
1761 plimage( aa, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, dxmin, dxmax, dymin, dymax );
1772 f2c( a, aa, nx, ny );
1773 plimagefr( aa, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, NULL, NULL );
1781 f2c( a, aa, nx, ny );
1782 plimagefr( aa, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax,
xform, tr );
1792 grid1.
nx = nx + 1; grid1.
ny = ny + 1;
1794 f2c( a, aa, nx, ny );
1795 c_plimagefr( aa, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax,
pltr1, &grid1 );
1805 f2c( xg, xgg, ( nx + 1 ), ( ny + 1 ) );
f2c( yg, ygg, ( nx + 1 ), ( ny + 1 ) );
1806 grid2.
nx = nx + 1; grid2.
ny = ny + 1;
1807 grid2.
xg = xgg; grid2.
yg = ygg;
1808 f2c( a, aa, nx, ny );
1809 c_plimagefr( aa, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax,
pltr2, &grid2 );
1829 PLINT n_labels, const
PLINT *label_opts, const
char * const *label,
1830 PLINT nx, const
char * const * axis_opts,
1836 for ( i = 0; i <
nx; i++ )
1837 if ( n_values[i] < ny )
1839 f2c( a, aa, nx, ny );
1841 opt, position, x, y,
1843 bg_color, bb_color, bb_style,
1844 low_cap_color, high_cap_color,
1845 cont_color, cont_width,
1846 n_labels, label_opts, label,
1856 #endif // __PLPLOT_H__