1 //  Macros and prototypes for the PLplot package.  This header file must
2 //  be included by all user codes.
3 //
4 //  Note: some systems allow the Fortran & C namespaces to clobber each
5 //  other.  So for PLplot to work from Fortran, we do some rather nasty
6 //  things to the externally callable C function names.  This shouldn't
7 //  affect any user programs in C as long as this file is included.
8 //
9 // Copyright (C) 1992 Tony Richardson.
10 // Copyright (C) 1992-2001 Geoffrey Furnish
11 // Copyright (C) 1992-2002 Maurice LeBrun
12 // Copyright (C) 1996 Rady Shouman
13 // Copyright (C) 2000-2019 Alan W. Irwin
14 // Copyright (C) 2001-2003 Joao Cardoso
15 // Copyright (C) 2001-2005 Rafael Laboissiere
16 // Copyright (C) 2004-2013 Andrew Ross
17 // Copyright (C) 2005-2008 Arjen Markus
18 // Copyright (C) 2006-2011 Hazen Babcock
19 // Copyright (C) 2008-2009 Werner Smekal
20 // Copyright (C) 2009-2013 Hezekiah M. Carty
21 // Copyright (C) 2013 Jerry Bauck
22 // Copyright (C) 2014-2018 Phil Rosenberg
23 
24 //  This file is part of PLplot.
25 //
26 //  PLplot is free software; you can redistribute it and/or modify
27 //  it under the terms of the GNU Library General Public License as published
28 //  by the Free Software Foundation; either version 2 of the License, or
29 //  (at your option) any later version.
30 //
31 //  PLplot is distributed in the hope that it will be useful,
32 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
33 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
34 //  GNU Library General Public License for more details.
35 //
36 //  You should have received a copy of the GNU Library General Public License
37 //  along with PLplot; if not, write to the Free Software
38 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
39 //
40 
41 #ifndef __PLPLOT_H__
42 #define __PLPLOT_H__
43 
44 #include "plConfig.h"
45 
46 //--------------------------------------------------------------------------
47 //    USING PLplot
48 //
49 // To use PLplot from C or C++, it is only necessary to
50 //
51 //      #include "plplot.h"
52 //
53 // This file does all the necessary setup to make PLplot accessible to
54 // your program as documented in the manual.  Additionally, this file
55 // allows you to request certain behavior by defining certain symbols
56 // before inclusion.  At the moment the only one is:
57 //
58 // #define DOUBLE	or..
59 // #define PL_DOUBLE
60 //
61 // This causes PLplot to use doubles instead of floats.  Use the type
62 // PLFLT everywhere in your code, and it will always be the right thing.
63 //
64 // Note: most of the functions visible here begin with "pl", while all
65 // of the data types and switches begin with "PL".  Eventually everything
66 // will conform to this rule in order to keep namespace pollution of the
67 // user code to a minimum.  All the PLplot source files actually include
68 // "plplotP.h", which includes this file as well as all the internally-
69 // visible declarations, etc.
70 //--------------------------------------------------------------------------
71 
72 // The majority of PLplot source files require these, so..
73 // Under ANSI C, they can be included any number of times.
74 
75 #include <stdio.h>
76 #include <stdlib.h>
77 
78 //--------------------------------------------------------------------------
79 //        SYSTEM IDENTIFICATION
80 //
81 // Several systems are supported directly by PLplot.  In order to avoid
82 // confusion, one id macro per system is used.  Since different compilers
83 // may predefine different system id macros, we need to check all the
84 // possibilities, and then set the one we will be referencing.  These are:
85 //
86 // __cplusplus                Any C++ compiler
87 // __unix                     Any Unix-like system
88 // __hpux                     Any HP/UX system
89 // __aix                      Any AIX system
90 // __linux                    Linux for i386
91 // (others...)
92 //
93 //--------------------------------------------------------------------------
94 
95 #ifdef unix                     // the old way
96 #ifndef __unix
97 #define __unix
98 #endif
99 #endif
100 
101 #if 0
102 #if defined ( __GNUC__ ) && __GNUC__ > 3
103 // If gcc 4.x, then turn off all visibility of symbols unless
104 // specified as visible using PLDLLIMPEXP.
105 //#pragma GCC visibility push(hidden)
106 // temporary until issues with above hidden can be sorted out
107   #pragma GCC visibility push(default)
108 #endif
109 #endif
110 // Make sure Unix systems define "__unix"
111 
112 #if defined ( SX ) ||                                 /* NEC Super-UX */      \
113     ( defined ( _IBMR2 ) && defined ( _AIX ) ) ||     /* AIX */               \
114     defined ( __hpux ) ||                             /* HP/UX */             \
115     defined ( sun ) ||                                /* SUN */               \
116     defined ( CRAY ) ||                               /* Cray */              \
117     defined ( __convexc__ ) ||                        /* CONVEX */            \
118     ( defined ( __alpha ) && defined ( __osf__ ) ) || /* DEC Alpha AXP/OSF */ \
119     defined ( __APPLE__ )                             // Max OS-X
120 #ifndef __unix
121 #define __unix
122 #endif
123 #endif
124 
125 //--------------------------------------------------------------------------
126 // dll functions
127 //--------------------------------------------------------------------------
128 #include "pldll.h"
129 
130 // Macro to mark function parameters as unused.
131 // For gcc this uses the unused attribute to remove compiler warnings.
132 // For all compilers the parameter name is also mangled to prevent
133 // accidental use.
134 #ifdef PL_UNUSED
135 #elif defined ( __GNUC__ )
136 # define PL_UNUSED( x )    UNUSED_ ## x __attribute__( ( unused ) )
137 #else
138 # define PL_UNUSED( x )    UNUSED_ ## x
139 #endif
140 
141 //--------------------------------------------------------------------------
142 // Base types for PLplot
143 //
144 // Only those that are necessary for function prototypes are defined here.
145 // Notes:
146 //
147 // short is currently used for device page coordinates, so they are
148 // bounded by (-32767, 32767).  This gives a max resolution of about 3000
149 // dpi, and improves performance in some areas over using a PLINT.
150 //
151 // PLUNICODE should be a 32-bit unsigned integer on all platforms.
152 // For now, we are using unsigned int for our Linux ix86 unicode experiments,
153 // but that doesn't guarantee 32 bits exactly on all platforms so this will
154 // be subject to change.
155 //--------------------------------------------------------------------------
156 
157 #if defined ( PL_DOUBLE ) || defined ( DOUBLE )
158 typedef double   PLFLT;
159 #define PLFLT_MAX         DBL_MAX
160 #define PLFLT_MIN         DBL_MIN
161 #define PLFLT_HUGE_VAL    HUGE_VAL
162 #else
163 typedef float    PLFLT;
164 #define PLFLT_MAX         FLT_MAX
165 #define PLFLT_MIN         FLT_MIN
166 #define PLFLT_HUGE_VAL    HUGE_VALF
167 #endif
168 
169 #if ( defined ( PL_HAVE_STDINT_H ) && !defined ( __cplusplus ) ) || \
170     ( defined ( __cplusplus ) && defined ( PL_HAVE_CXX_STDINT_H ) )
171 #include <stdint.h>
172 // This is apparently portable if stdint.h exists.
173 typedef uint32_t       PLUINT;
174 typedef int32_t        PLINT;
175 typedef int64_t        PLINT64;
176 #define PLINT_MIN    INT32_MIN
177 #define PLINT_MAX    INT32_MAX
178 #else
179 // A reasonable back-up in case stdint.h does not exist on the platform.
180 typedef unsigned int   PLUINT;
181 typedef int            PLINT;
182 typedef __int64        PLINT64;
183 // for Visual C++ 2003 and later INT_MIN must be used, otherwise
184 //  PLINT_MIN is unsigned and 2147483648 NOT -2147483648, see
185 //  http://msdn.microsoft.com/en-us/library/4kh09110(VS.71).aspx for
186 //  details
187 #if defined ( _MSC_VER ) && _MSC_VER >= 1310
188   #include <Limits.h>
189   #define PLINT_MIN    INT_MIN
190 #else
191   #define PLINT_MIN    -2147483648
192 #endif
193 //
194 // typedef unsigned int PLUINT;
195 // typedef int PLINT;
196 // typedef long long PLINT64;
197 //
198 #endif
199 
200 // For identifying unicode characters
201 typedef PLUINT   PLUNICODE;
202 
203 // For identifying logical (boolean) arguments
204 typedef PLINT    PLBOOL;
205 
206 // typedefs for generic pointers.
207 
208 // generic pointer to mutable object:
209 typedef void *   PLPointer;
210 
211 // PLFLT first element pointers which are used to point to the first
212 // element of a contigous block of memory containing a PLFLT array with
213 // an arbitrary number of dimensions.
214 
215 // mutable version
216 typedef PLFLT *       PLFLT_NC_FE_POINTER;
217 // immutable version
218 typedef const PLFLT * PLFLT_FE_POINTER;
219 
220 // typedefs that are typically used for passing scalar, vector, and
221 // matrix arguments to functions.  The NC attribute concerns pointers
222 // to mutable objects, where the objects are used for passing values
223 // that are either output only or both input and output.  Pointers whose
224 // name does not contain the NC attribute point to immutable objects
225 // which are strictly input and guaranteed to be unchanged by the function.
226 //
227 
228 // Pointers to mutable scalars:
229 typedef PLINT *               PLINT_NC_SCALAR;
230 typedef PLBOOL *              PLBOOL_NC_SCALAR;
231 typedef PLUNICODE *           PLUNICODE_NC_SCALAR;
232 typedef char *                PLCHAR_NC_SCALAR;
233 typedef PLFLT *               PLFLT_NC_SCALAR;
234 
235 // Pointers to mutable vectors:
236 typedef PLINT *               PLINT_NC_VECTOR;
237 typedef char *                PLCHAR_NC_VECTOR;
238 typedef PLFLT *               PLFLT_NC_VECTOR;
239 
240 // Pointers to immutable vectors:
241 typedef const PLINT *         PLINT_VECTOR;
242 typedef const PLBOOL *        PLBOOL_VECTOR;
243 typedef const char *          PLCHAR_VECTOR;
244 typedef const PLFLT *         PLFLT_VECTOR;
245 
246 // Pointers to mutable 2-dimensional matrices:
247 typedef char **               PLCHAR_NC_MATRIX;
248 typedef PLFLT **              PLFLT_NC_MATRIX;
249 
250 // Pointers to immutable 2-dimensional matrices,
251 // (i.e., pointers to const pointers to const values):
252 typedef const char * const *  PLCHAR_MATRIX;
253 typedef const PLFLT * const * PLFLT_MATRIX;
254 
255 // Callback-related typedefs
256 typedef void ( *PLMAPFORM_callback )( PLINT n, PLFLT_NC_VECTOR x, PLFLT_NC_VECTOR y );
257 typedef void ( *PLTRANSFORM_callback )( PLFLT x, PLFLT y, PLFLT_NC_SCALAR xp, PLFLT_NC_SCALAR yp, PLPointer data );
258 typedef void ( *PLLABEL_FUNC_callback )( PLINT axis, PLFLT value, PLCHAR_NC_VECTOR label, PLINT length, PLPointer data );
259 typedef PLFLT ( *PLF2EVAL_callback )( PLINT ix, PLINT iy, PLPointer data );
260 typedef void ( *PLFILL_callback )( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y );
261 typedef PLINT ( *PLDEFINED_callback )( PLFLT x, PLFLT y );
262 
263 //--------------------------------------------------------------------------
264 // Complex data types and other good stuff
265 //--------------------------------------------------------------------------
266 
267 // Switches for escape function call.
268 // Some of these are obsolete but are retained in order to process
269 // old metafiles
270 
271 #define PLESC_SET_RGB                   1  // obsolete
272 #define PLESC_ALLOC_NCOL                2  // obsolete
273 #define PLESC_SET_LPB                   3  // obsolete
274 #define PLESC_EXPOSE                    4  // handle window expose
275 #define PLESC_RESIZE                    5  // handle window resize
276 #define PLESC_REDRAW                    6  // handle window redraw
277 #define PLESC_TEXT                      7  // switch to text screen
278 #define PLESC_GRAPH                     8  // switch to graphics screen
279 #define PLESC_FILL                      9  // fill polygon
280 #define PLESC_DI                        10 // handle DI command
281 #define PLESC_FLUSH                     11 // flush output
282 #define PLESC_EH                        12 // handle Window events
283 #define PLESC_GETC                      13 // get cursor position
284 #define PLESC_SWIN                      14 // set window parameters
285 #define PLESC_DOUBLEBUFFERING           15 // configure double buffering
286 #define PLESC_XORMOD                    16 // set xor mode
287 #define PLESC_SET_COMPRESSION           17 // AFR: set compression
288 #define PLESC_CLEAR                     18 // RL: clear graphics region
289 #define PLESC_DASH                      19 // RL: draw dashed line
290 #define PLESC_HAS_TEXT                  20 // driver draws text
291 #define PLESC_IMAGE                     21 // handle image
292 #define PLESC_IMAGEOPS                  22 // plimage related operations
293 #define PLESC_PL2DEVCOL                 23 // convert PLColor to device color
294 #define PLESC_DEV2PLCOL                 24 // convert device color to PLColor
295 #define PLESC_SETBGFG                   25 // set BG, FG colors
296 #define PLESC_DEVINIT                   26 // alternate device initialization
297 #define PLESC_GETBACKEND                27 // get used backend of (wxWidgets) driver - no longer used
298 #define PLESC_BEGIN_TEXT                28 // get ready to draw a line of text
299 #define PLESC_TEXT_CHAR                 29 // render a character of text
300 #define PLESC_CONTROL_CHAR              30 // handle a text control character (super/subscript, etc.)
301 #define PLESC_END_TEXT                  31 // finish a drawing a line of text
302 #define PLESC_START_RASTERIZE           32 // start rasterized rendering
303 #define PLESC_END_RASTERIZE             33 // end rasterized rendering
304 #define PLESC_ARC                       34 // render an arc
305 #define PLESC_GRADIENT                  35 // render a gradient
306 #define PLESC_MODESET                   36 // set drawing mode
307 #define PLESC_MODEGET                   37 // get drawing mode
308 #define PLESC_FIXASPECT                 38 // set or unset fixing the aspect ratio of the plot
309 #define PLESC_IMPORT_BUFFER             39 // set the contents of the buffer to a specified byte string
310 #define PLESC_APPEND_BUFFER             40 // append the given byte string to the buffer
311 #define PLESC_FLUSH_REMAINING_BUFFER    41 // flush the remaining buffer e.g. after new data was appended
312 
313 // Alternative unicode text handling control characters
314 #define PLTEXT_FONTCHANGE               0 // font change in the text stream
315 #define PLTEXT_SUPERSCRIPT              1 // superscript in the text stream
316 #define PLTEXT_SUBSCRIPT                2 // subscript in the text stream
317 #define PLTEXT_BACKCHAR                 3 // back-char in the text stream
318 #define PLTEXT_OVERLINE                 4 // toggle overline in the text stream
319 #define PLTEXT_UNDERLINE                5 // toggle underline in the text stream
320 
321 // image operations
322 #define ZEROW2B                         1
323 #define ZEROW2D                         2
324 #define ONEW2B                          3
325 #define ONEW2D                          4
326 
327 // Window parameter tags
328 
329 #define PLSWIN_DEVICE    1              // device coordinates
330 #define PLSWIN_WORLD     2              // world coordinates
331 
332 // Axis label tags
333 #define PL_X_AXIS        1              // The x-axis
334 #define PL_Y_AXIS        2              // The y-axis
335 #define PL_Z_AXIS        3              // The z-axis
336 
337 // PLplot Option table & support constants
338 
339 // Option-specific settings
340 
341 #define PL_OPT_ENABLED      0x0001      // Obsolete
342 #define PL_OPT_ARG          0x0002      // Option has an argument
343 #define PL_OPT_NODELETE     0x0004      // Don't delete after processing
344 #define PL_OPT_INVISIBLE    0x0008      // Make invisible
345 #define PL_OPT_DISABLED     0x0010      // Processing is disabled
346 
347 // Option-processing settings -- mutually exclusive
348 
349 #define PL_OPT_FUNC      0x0100         // Call handler function
350 #define PL_OPT_BOOL      0x0200         // Set *var = 1
351 #define PL_OPT_INT       0x0400         // Set *var = atoi(optarg)
352 #define PL_OPT_FLOAT     0x0800         // Set *var = atof(optarg)
353 #define PL_OPT_STRING    0x1000         // Set var = optarg
354 
355 // Global mode settings
356 // These override per-option settings
357 
358 #define PL_PARSE_PARTIAL              0x0000 // For backward compatibility
359 #define PL_PARSE_FULL                 0x0001 // Process fully & exit if error
360 #define PL_PARSE_QUIET                0x0002 // Don't issue messages
361 #define PL_PARSE_NODELETE             0x0004 // Don't delete options after
362                                              // processing
363 #define PL_PARSE_SHOWALL              0x0008 // Show invisible options
364 #define PL_PARSE_OVERRIDE             0x0010 // Obsolete
365 #define PL_PARSE_NOPROGRAM            0x0020 // Program name NOT in *argv[0]..
366 #define PL_PARSE_NODASH               0x0040 // Set if leading dash NOT required
367 #define PL_PARSE_SKIP                 0x0080 // Skip over unrecognized args
368 
369 // FCI (font characterization integer) related constants.
370 #define PL_FCI_MARK                   0x80000000
371 #define PL_FCI_IMPOSSIBLE             0x00000000
372 #define PL_FCI_HEXDIGIT_MASK          0xf
373 #define PL_FCI_HEXPOWER_MASK          0x7
374 #define PL_FCI_HEXPOWER_IMPOSSIBLE    0xf
375 // These define hexpower values corresponding to each font attribute.
376 #define PL_FCI_FAMILY                 0x0
377 #define PL_FCI_STYLE                  0x1
378 #define PL_FCI_WEIGHT                 0x2
379 // These are legal values for font family attribute
380 #define PL_FCI_SANS                   0x0
381 #define PL_FCI_SERIF                  0x1
382 #define PL_FCI_MONO                   0x2
383 #define PL_FCI_SCRIPT                 0x3
384 #define PL_FCI_SYMBOL                 0x4
385 // These are legal values for font style attribute
386 #define PL_FCI_UPRIGHT                0x0
387 #define PL_FCI_ITALIC                 0x1
388 #define PL_FCI_OBLIQUE                0x2
389 // These are legal values for font weight attribute
390 #define PL_FCI_MEDIUM                 0x0
391 #define PL_FCI_BOLD                   0x1
392 
393 // Option table definition
394 
395 typedef struct
396 {
397     PLCHAR_VECTOR opt;
398     int ( *handler )( PLCHAR_VECTOR, PLCHAR_VECTOR, PLPointer );
399     PLPointer     client_data;
400     PLPointer     var;
401     long          mode;
402     PLCHAR_VECTOR syntax;
403     PLCHAR_VECTOR desc;
404 } PLOptionTable;
405 
406 // PLplot Graphics Input structure
407 
408 #define PL_MAXKEY    16
409 
410 //Masks for use with PLGraphicsIn::state
411 //These exactly coincide with the X11 masks
412 //from X11/X.h, however the values 1<<3 to
413 //1<<7 aparently may vary depending upon
414 //X implementation and keyboard
415 // Numerical #defines are parsed further to help determine
416 // additional files such as ../bindings/swig-support/plplotcapi.i
417 // so must #define numerical #defines with numbers rather than C operators
418 // such as <<.
419 #define PL_MASK_SHIFT      0x1    // ( 1 << 0 )
420 #define PL_MASK_CAPS       0x2    // ( 1 << 1 )
421 #define PL_MASK_CONTROL    0x4    // ( 1 << 2 )
422 #define PL_MASK_ALT        0x8    // ( 1 << 3 )
423 #define PL_MASK_NUM        0x10   // ( 1 << 4 )
424 #define PL_MASK_ALTGR      0x20   //  ( 1 << 5 )
425 #define PL_MASK_WIN        0x40   // ( 1 << 6 )
426 #define PL_MASK_SCROLL     0x80   // ( 1 << 7 )
427 #define PL_MASK_BUTTON1    0x100  // ( 1 << 8 )
428 #define PL_MASK_BUTTON2    0x200  // ( 1 << 9 )
429 #define PL_MASK_BUTTON3    0x400  // ( 1 << 10 )
430 #define PL_MASK_BUTTON4    0x800  // ( 1 << 11 )
431 #define PL_MASK_BUTTON5    0x1000 // ( 1 << 12 )
432 
433 typedef struct
434 {
435     int          type;              // of event (CURRENTLY UNUSED)
436     unsigned int state;             // key or button mask
437     unsigned int keysym;            // key selected
438     unsigned int button;            // mouse button selected
439     PLINT        subwindow;         // subwindow (alias subpage, alias subplot) number
440     char         string[PL_MAXKEY]; // translated string
441     int          pX, pY;            // absolute device coordinates of pointer
442     PLFLT        dX, dY;            // relative device coordinates of pointer
443     PLFLT        wX, wY;            // world coordinates of pointer
444 } PLGraphicsIn;
445 
446 // Structure for describing the plot window
447 
448 #define PL_MAXWINDOWS    64     // Max number of windows/page tracked
449 
450 typedef struct
451 {
452     PLFLT dxmi, dxma, dymi, dyma;       // min, max window rel dev coords
453     PLFLT wxmi, wxma, wymi, wyma;       // min, max window world coords
454 } PLWindow;
455 
456 // Structure for doing display-oriented operations via escape commands
457 // May add other attributes in time
458 
459 typedef struct
460 {
461     unsigned int x, y;                  // upper left hand corner
462     unsigned int width, height;         // window dimensions
463 } PLDisplay;
464 
465 // Macro used (in some cases) to ignore value of argument
466 // I don't plan on changing the value so you can hard-code it
467 
468 #define PL_NOTSET    ( -42 )
469 
470 // See plcont.c for examples of the following
471 
472 //
473 // PLfGrid is for passing (as a pointer to the first element) an arbitrarily
474 // dimensioned array.  The grid dimensions MUST be stored, with a maximum of 3
475 // dimensions assumed for now.
476 //
477 
478 typedef struct
479 {
480     PLFLT_FE_POINTER f;
481     PLINT            nx, ny, nz;
482 } PLfGrid;
483 
484 //
485 // PLfGrid2 is for passing (as an array of pointers) a 2d function array.  The
486 // grid dimensions are passed for possible bounds checking.
487 //
488 
489 typedef struct
490 {
491     PLFLT_NC_MATRIX f;
492     PLINT           nx, ny;
493 } PLfGrid2;
494 
495 //
496 // NOTE: a PLfGrid3 is a good idea here but there is no way to exploit it yet
497 // so I'll leave it out for now.
498 //
499 
500 //
501 // PLcGrid is for passing (as a pointer to the first element) arbitrarily
502 // dimensioned coordinate transformation arrays.  The grid dimensions MUST be
503 // stored, with a maximum of 3 dimensions assumed for now.
504 //
505 
506 typedef struct
507 {
508     PLFLT_NC_FE_POINTER xg, yg, zg;
509     PLINT nx, ny, nz;
510 } PLcGrid;
511 
512 //
513 // PLcGrid2 is for passing (as arrays of pointers) 2d coordinate
514 // transformation arrays.  The grid dimensions are passed for possible bounds
515 // checking.
516 //
517 
518 typedef struct
519 {
520     PLFLT_NC_MATRIX xg, yg, zg;
521     PLINT           nx, ny;
522 } PLcGrid2;
523 
524 //
525 // NOTE: a PLcGrid3 is a good idea here but there is no way to exploit it yet
526 // so I'll leave it out for now.
527 //
528 
529 // Color limits:
530 
531 // Default number of colors for cmap0 and cmap1.
532 #define PL_DEFAULT_NCOL0    16
533 #define PL_DEFAULT_NCOL1    128
534 // minimum and maximum PLINT RGB values.
535 #define MIN_PLINT_RGB       0
536 #define MAX_PLINT_RGB       255
537 // minimum and maximum PLFLT cmap1 color index values.
538 #define MIN_PLFLT_CMAP1     0.
539 #define MAX_PLFLT_CMAP1     1.
540 // minimum and maximum PLFLT alpha values.
541 #define MIN_PLFLT_ALPHA     0.
542 #define MAX_PLFLT_ALPHA     1.
543 
544 // PLColor is the usual way to pass an rgb color value.
545 
546 typedef struct
547 {
548     unsigned char r;            // red
549     unsigned char g;            // green
550     unsigned char b;            // blue
551     PLFLT         a;            // alpha (or transparency)
552     PLCHAR_VECTOR name;
553 } PLColor;
554 
555 // PLControlPt is how cmap1 control points are represented.
556 
557 typedef struct
558 {
559     PLFLT c1;                   // hue or red
560     PLFLT c2;                   // lightness or green
561     PLFLT c3;                   // saturation or blue
562     PLFLT p;                    // position
563     PLFLT a;                    // alpha (or transparency)
564     int   alt_hue_path;         // if set, interpolate through h=0
565 } PLControlPt;
566 
567 // A PLBufferingCB is a control block for interacting with devices
568 // that support double buffering.
569 
570 typedef struct
571 {
572     PLINT cmd;
573     PLINT result;
574 } PLBufferingCB;
575 
576 #define PLESC_DOUBLEBUFFERING_ENABLE     1
577 #define PLESC_DOUBLEBUFFERING_DISABLE    2
578 #define PLESC_DOUBLEBUFFERING_QUERY      3
579 
580 typedef struct
581 {
582     PLFLT exp_label_disp;
583     PLFLT exp_label_pos;
584     PLFLT exp_label_just;
585 } PLLabelDefaults;
586 
587 //
588 // typedefs for access methods for arbitrary (i.e. user defined) data storage
589 //
590 
591 //
592 // This type of struct holds pointers to functions that are used to
593 // get, set, modify, and test individual 2-D data points referenced by
594 // a PLPointer or PLPointer.  How these
595 // generic pointers are used depends entirely on the functions
596 // that implement the various operations.  Certain common data
597 // representations have predefined instances of this structure
598 // prepopulated with pointers to predefined functions.
599 //
600 
601 typedef struct
602 {
603     PLFLT ( *get )( PLPointer p, PLINT ix, PLINT iy );
604     PLFLT ( *set )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
605     PLFLT ( *add )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
606     PLFLT ( *sub )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
607     PLFLT ( *mul )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
608     PLFLT ( *div )( PLPointer p, PLINT ix, PLINT iy, PLFLT z );
609     PLINT ( *is_nan )( PLPointer p, PLINT ix, PLINT iy );
610     void ( *minmax )( PLPointer p, PLINT nx, PLINT ny, PLFLT_NC_SCALAR zmin, PLFLT_NC_SCALAR zmax );
611     //
612     // f2eval is backwards compatible signature for "f2eval" functions that
613     // existed before plf2ops "operator function families" were used.
614     //
615     PLFLT ( *f2eval )( PLINT ix, PLINT iy, PLPointer p );
616 } plf2ops_t;
617 
618 //
619 // A typedef to facilitate declaration of a pointer to a plfops_t structure.
620 //
621 
622 typedef plf2ops_t * PLF2OPS;
623 
624 //
625 // A struct to pass a buffer around
626 //
627 typedef struct
628 {
629     size_t    size;
630     PLPointer buffer;
631 } plbuffer;
632 
633 //--------------------------------------------------------------------------
634 //		BRAINDEAD-ness
635 //
636 // Some systems allow the Fortran & C namespaces to clobber each other.
637 // For PLplot to work from Fortran on these systems, we must name the the
638 // externally callable C functions something other than their Fortran entry
639 // names.  In order to make this as easy as possible for the casual user,
640 // yet reversible to those who abhor my solution, I have done the
641 // following:
642 //
643 //	The C-language bindings are actually different from those
644 //	described in the manual.  Macros are used to convert the
645 //	documented names to the names used in this package.  The
646 //	user MUST include plplot.h in order to get the name
647 //	redefinition correct.
648 //
649 // Sorry to have to resort to such an ugly kludge, but it is really the
650 // best way to handle the situation at present.  If all available
651 // compilers offer a way to correct this stupidity, then perhaps we can
652 // eventually reverse it.
653 //
654 // If you feel like screaming at someone (I sure do), please
655 // direct it at your nearest system vendor who has a braindead shared
656 // C/Fortran namespace.  Some vendors do offer compiler switches that
657 // change the object names, but then everybody who wants to use the
658 // package must throw these same switches, leading to no end of trouble.
659 //
660 // Note that this definition should not cause any noticable effects except
661 // when debugging PLplot calls, in which case you will need to remember
662 // the real function names (same as before but with a 'c_' prepended).
663 //
664 // Also, to avoid macro conflicts, the BRAINDEAD part must not be expanded
665 // in the stub routines.
666 //
667 // Aside: the reason why a shared Fortran/C namespace is deserving of the
668 // BRAINDEAD characterization is that it completely precludes the the kind
669 // of universal API that is attempted (more or less) with PLplot, without
670 // Herculean efforts (e.g. remapping all of the C bindings by macros as
671 // done here).  The vendors of such a scheme, in order to allow a SINGLE
672 // type of argument to be passed transparently between C and Fortran,
673 // namely, a pointer to a conformable data type, have slammed the door on
674 // insertion of stub routines to handle the conversions needed for other
675 // data types.  Intelligent linkers could solve this problem, but these are
676 // not anywhere close to becoming universal.  So meanwhile, one must live
677 // with either stub routines for the inevitable data conversions, or a
678 // different API.  The former is what is used here, but is made far more
679 // difficult in a braindead shared Fortran/C namespace.
680 //--------------------------------------------------------------------------
681 
682 #ifndef BRAINDEAD
683 #define BRAINDEAD
684 #endif
685 
686 #ifdef BRAINDEAD
687 
688 #ifndef __PLSTUBS_H__   // i.e. do not expand this in the stubs
689 
690 #define    pl_setcontlabelformat    c_pl_setcontlabelformat
691 #define    pl_setcontlabelparam     c_pl_setcontlabelparam
692 #define    pladv                    c_pladv
693 #define    plarc                    c_plarc
694 #define    plaxes                   c_plaxes
695 #define    plbin                    c_plbin
696 #define    plbop                    c_plbop
697 #define    plbox                    c_plbox
698 #define    plbox3                   c_plbox3
699 #define    plbtime                  c_plbtime
700 #define    plcalc_world             c_plcalc_world
701 #define    plclear                  c_plclear
702 #define    plcol0                   c_plcol0
703 #define    plcol1                   c_plcol1
704 #define    plcolorbar               c_plcolorbar
705 #define    plconfigtime             c_plconfigtime
706 #define    plcont                   c_plcont
707 #define    plcpstrm                 c_plcpstrm
708 #define    plctime                  c_plctime
709 #define    plend                    c_plend
710 #define    plend1                   c_plend1
711 #define    plenv                    c_plenv
712 #define    plenv0                   c_plenv0
713 #define    pleop                    c_pleop
714 #define    plerrx                   c_plerrx
715 #define    plerry                   c_plerry
716 #define    plfamadv                 c_plfamadv
717 #define    plfill                   c_plfill
718 #define    plfill3                  c_plfill3
719 #define    plflush                  c_plflush
720 #define    plfont                   c_plfont
721 #define    plfontld                 c_plfontld
722 #define    plgchr                   c_plgchr
723 #define    plgcmap1_range           c_plgcmap1_range
724 #define    plgcol0                  c_plgcol0
725 #define    plgcol0a                 c_plgcol0a
726 #define    plgcolbg                 c_plgcolbg
727 #define    plgcolbga                c_plgcolbga
728 #define    plgcompression           c_plgcompression
729 #define    plgdev                   c_plgdev
730 #define    plgdidev                 c_plgdidev
731 #define    plgdiori                 c_plgdiori
732 #define    plgdiplt                 c_plgdiplt
733 #define    plgdrawmode              c_plgdrawmode
734 #define    plgfam                   c_plgfam
735 #define    plgfci                   c_plgfci
736 #define    plgfnam                  c_plgfnam
737 #define    plgfont                  c_plgfont
738 #define    plglevel                 c_plglevel
739 #define    plgpage                  c_plgpage
740 #define    plgra                    c_plgra
741 #define    plgradient               c_plgradient
742 #define    plgriddata               c_plgriddata
743 #define    plgspa                   c_plgspa
744 #define    plgstrm                  c_plgstrm
745 #define    plgver                   c_plgver
746 #define    plgvpd                   c_plgvpd
747 #define    plgvpw                   c_plgvpw
748 #define    plgxax                   c_plgxax
749 #define    plgyax                   c_plgyax
750 #define    plgzax                   c_plgzax
751 #define    plhist                   c_plhist
752 #define    plhlsrgb                 c_plhlsrgb
753 #define    plimage                  c_plimage
754 #define    plimagefr                c_plimagefr
755 #define    plinit                   c_plinit
756 #define    pljoin                   c_pljoin
757 #define    pllab                    c_pllab
758 #define    pllegend                 c_pllegend
759 #define    pllightsource            c_pllightsource
760 #define    plline                   c_plline
761 #define    plpath                   c_plpath
762 #define    plline3                  c_plline3
763 #define    pllsty                   c_pllsty
764 #define    plmap                    c_plmap
765 #define    plmapline                c_plmapline
766 #define    plmapstring              c_plmapstring
767 #define    plmaptex                 c_plmaptex
768 #define    plmapfill                c_plmapfill
769 #define    plmeridians              c_plmeridians
770 #define    plmesh                   c_plmesh
771 #define    plmeshc                  c_plmeshc
772 #define    plmkstrm                 c_plmkstrm
773 #define    plmtex                   c_plmtex
774 #define    plmtex3                  c_plmtex3
775 #define    plot3d                   c_plot3d
776 #define    plot3dc                  c_plot3dc
777 #define    plot3dcl                 c_plot3dcl
778 #define    plparseopts              c_plparseopts
779 #define    plpat                    c_plpat
780 #define    plpoin                   c_plpoin
781 #define    plpoin3                  c_plpoin3
782 #define    plpoly3                  c_plpoly3
783 #define    plprec                   c_plprec
784 #define    plpsty                   c_plpsty
785 #define    plptex                   c_plptex
786 #define    plptex3                  c_plptex3
787 #define    plrandd                  c_plrandd
788 #define    plreplot                 c_plreplot
789 #define    plrgbhls                 c_plrgbhls
790 #define    plschr                   c_plschr
791 #define    plscmap0                 c_plscmap0
792 #define    plscmap0a                c_plscmap0a
793 #define    plscmap0n                c_plscmap0n
794 #define    plscmap1                 c_plscmap1
795 #define    plscmap1a                c_plscmap1a
796 #define    plscmap1l                c_plscmap1l
797 #define    plscmap1la               c_plscmap1la
798 #define    plscmap1n                c_plscmap1n
799 #define    plscmap1_range           c_plscmap1_range
800 #define    plscol0                  c_plscol0
801 #define    plscol0a                 c_plscol0a
802 #define    plscolbg                 c_plscolbg
803 #define    plscolbga                c_plscolbga
804 #define    plscolor                 c_plscolor
805 #define    plscompression           c_plscompression
806 #define    plsdev                   c_plsdev
807 #define    plsdidev                 c_plsdidev
808 #define    plsdimap                 c_plsdimap
809 #define    plsdiori                 c_plsdiori
810 #define    plsdiplt                 c_plsdiplt
811 #define    plsdiplz                 c_plsdiplz
812 #define    plsdrawmode              c_plsdrawmode
813 #define    plseed                   c_plseed
814 #define    plsesc                   c_plsesc
815 #define    plsetopt                 c_plsetopt
816 #define    plsfam                   c_plsfam
817 #define    plsfci                   c_plsfci
818 #define    plsfnam                  c_plsfnam
819 #define    plsfont                  c_plsfont
820 #define    plshade                  c_plshade
821 #ifdef PL_DEPRECATED
822 #define    plshade1                 c_plshade1
823 #endif // PL_DEPRECATED
824 #define    plshades                 c_plshades
825 #define    plslabelfunc             c_plslabelfunc
826 #define    plsmaj                   c_plsmaj
827 #define    plsmem                   c_plsmem
828 #define    plsmema                  c_plsmema
829 #define    plsmin                   c_plsmin
830 #define    plsori                   c_plsori
831 #define    plspage                  c_plspage
832 #define    plspal0                  c_plspal0
833 #define    plspal1                  c_plspal1
834 #define    plspause                 c_plspause
835 #define    plsstrm                  c_plsstrm
836 #define    plssub                   c_plssub
837 #define    plssym                   c_plssym
838 #define    plstar                   c_plstar
839 #define    plstart                  c_plstart
840 #define    plstransform             c_plstransform
841 #define    plstring                 c_plstring
842 #define    plstring3                c_plstring3
843 #define    plstripa                 c_plstripa
844 #define    plstripc                 c_plstripc
845 #define    plstripd                 c_plstripd
846 #define    plstyl                   c_plstyl
847 #define    plsurf3d                 c_plsurf3d
848 #define    plsurf3dl                c_plsurf3dl
849 #define    plsvect                  c_plsvect
850 #define    plsvpa                   c_plsvpa
851 #define    plsxax                   c_plsxax
852 #define    plsyax                   c_plsyax
853 #define    plsym                    c_plsym
854 #define    plszax                   c_plszax
855 #define    pltext                   c_pltext
856 #define    pltimefmt                c_pltimefmt
857 #define    plvasp                   c_plvasp
858 #define    plvect                   c_plvect
859 #define    plvpas                   c_plvpas
860 #define    plvpor                   c_plvpor
861 #define    plvsta                   c_plvsta
862 #define    plw3d                    c_plw3d
863 #define    plwidth                  c_plwidth
864 #define    plwind                   c_plwind
865 #define    plxormod                 c_plxormod
866 
867 #endif  // __PLSTUBS_H__
868 
869 #endif  // BRAINDEAD
870 
871 //--------------------------------------------------------------------------
872 //		Function Prototypes
873 //--------------------------------------------------------------------------
874 
875 #ifdef __cplusplus
876 extern "C" {
877 #endif
878 
879 // All void types
880 
881 // C routines callable from stub routines come first
882 
883 // set the format of the contour labels
884 
885 PLDLLIMPEXP void
886 c_pl_setcontlabelformat( PLINT lexp, PLINT sigdig );
887 
888 // set offset and spacing of contour labels
889 
890 PLDLLIMPEXP void
891 c_pl_setcontlabelparam( PLFLT offset, PLFLT size, PLFLT spacing, PLINT active );
892 
893 // Advance to subpage "page", or to the next one if "page" = 0.
894 
895 PLDLLIMPEXP void
896 c_pladv( PLINT page );
897 
898 // Plot an arc
899 
900 PLDLLIMPEXP void
901 c_plarc( PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2,
902          PLFLT rotate, PLBOOL fill );
903 
904 // This functions similarly to plbox() except that the origin of the axes
905 // is placed at the user-specified point (x0, y0).
906 
907 PLDLLIMPEXP void
908 c_plaxes( PLFLT x0, PLFLT y0, PLCHAR_VECTOR xopt, PLFLT xtick, PLINT nxsub,
909           PLCHAR_VECTOR yopt, PLFLT ytick, PLINT nysub );
910 
911 // Plot a histogram using x to store data values and y to store frequencies
912 
913 // Flags for plbin() - opt argument
914 #define PL_BIN_DEFAULT     0x0
915 #define PL_BIN_CENTRED     0x1
916 #define PL_BIN_NOEXPAND    0x2
917 #define PL_BIN_NOEMPTY     0x4
918 
919 PLDLLIMPEXP void
920 c_plbin( PLINT nbin, PLFLT_VECTOR x, PLFLT_VECTOR y, PLINT opt );
921 
922 // Calculate broken-down time from continuous time for current stream.
923 PLDLLIMPEXP void
924 c_plbtime( PLINT_NC_SCALAR year, PLINT_NC_SCALAR month, PLINT_NC_SCALAR day, PLINT_NC_SCALAR hour, PLINT_NC_SCALAR min, PLFLT_NC_SCALAR sec, PLFLT ctime );
925 
926 // Start new page.  Should only be used with pleop().
927 
928 PLDLLIMPEXP void
929 c_plbop( void );
930 
931 // This draws a box around the current viewport.
932 
933 PLDLLIMPEXP void
934 c_plbox( PLCHAR_VECTOR xopt, PLFLT xtick, PLINT nxsub,
935          PLCHAR_VECTOR yopt, PLFLT ytick, PLINT nysub );
936 
937 // This is the 3-d analogue of plbox().
938 
939 PLDLLIMPEXP void
940 c_plbox3( PLCHAR_VECTOR xopt, PLCHAR_VECTOR xlabel, PLFLT xtick, PLINT nxsub,
941           PLCHAR_VECTOR yopt, PLCHAR_VECTOR ylabel, PLFLT ytick, PLINT nysub,
942           PLCHAR_VECTOR zopt, PLCHAR_VECTOR zlabel, PLFLT ztick, PLINT nzsub );
943 
944 // Calculate world coordinates and subpage from relative device coordinates.
945 
946 PLDLLIMPEXP void
947 c_plcalc_world( PLFLT rx, PLFLT ry, PLFLT_NC_SCALAR wx, PLFLT_NC_SCALAR wy, PLINT_NC_SCALAR window );
948 
949 // Clear current subpage.
950 
951 PLDLLIMPEXP void
952 c_plclear( void );
953 
954 // Set color, map 0.  Argument is integer between 0 and 15.
955 
956 PLDLLIMPEXP void
957 c_plcol0( PLINT icol0 );
958 
959 // Set color, map 1.  Argument is a float between 0. and 1.
960 
961 PLDLLIMPEXP void
962 c_plcol1( PLFLT col1 );
963 
964 // Configure transformation between continuous and broken-down time (and
965 // vice versa) for current stream.
966 PLDLLIMPEXP void
967 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 );
968 
969 // Draws a contour plot from data in f(nx,ny).  Is just a front-end to
970 // plfcont, with a particular choice for f2eval and f2eval_data.
971 //
972 
973 PLDLLIMPEXP void
974 c_plcont( PLFLT_MATRIX f, PLINT nx, PLINT ny, PLINT kx, PLINT lx,
975           PLINT ky, PLINT ly, PLFLT_VECTOR clevel, PLINT nlevel,
976           PLTRANSFORM_callback pltr, PLPointer pltr_data );
977 
978 // Draws a contour plot using the function evaluator f2eval and data stored
979 // by way of the f2eval_data pointer.  This allows arbitrary organizations
980 // of 2d array data to be used.
981 //
982 
983 PLDLLIMPEXP void
984 plfcont( PLF2EVAL_callback f2eval, PLPointer f2eval_data,
985          PLINT nx, PLINT ny, PLINT kx, PLINT lx,
986          PLINT ky, PLINT ly, PLFLT_VECTOR clevel, PLINT nlevel,
987          PLTRANSFORM_callback pltr, PLPointer pltr_data );
988 
989 // Copies state parameters from the reference stream to the current stream.
990 
991 PLDLLIMPEXP void
992 c_plcpstrm( PLINT iplsr, PLBOOL flags );
993 
994 // Calculate continuous time from broken-down time for current stream.
995 PLDLLIMPEXP void
996 c_plctime( PLINT year, PLINT month, PLINT day, PLINT hour, PLINT min, PLFLT sec, PLFLT_NC_SCALAR ctime );
997 
998 // Converts input values from relative device coordinates to relative plot
999 // coordinates.
1000 
1001 PLDLLIMPEXP void
1002 pldid2pc( PLFLT_NC_SCALAR xmin, PLFLT_NC_SCALAR ymin, PLFLT_NC_SCALAR xmax, PLFLT_NC_SCALAR ymax );
1003 
1004 // Converts input values from relative plot coordinates to relative
1005 // device coordinates.
1006 
1007 PLDLLIMPEXP void
1008 pldip2dc( PLFLT_NC_SCALAR xmin, PLFLT_NC_SCALAR ymin, PLFLT_NC_SCALAR xmax, PLFLT_NC_SCALAR ymax );
1009 
1010 // End a plotting session for all open streams.
1011 
1012 PLDLLIMPEXP void
1013 c_plend( void );
1014 
1015 // End a plotting session for the current stream only.
1016 
1017 PLDLLIMPEXP void
1018 c_plend1( void );
1019 
1020 // Simple interface for defining viewport and window.
1021 
1022 PLDLLIMPEXP void
1023 c_plenv( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
1024          PLINT just, PLINT axis );
1025 
1026 
1027 // similar to plenv() above, but in multiplot mode does not advance the subpage,
1028 // instead the current subpage is cleared
1029 
1030 PLDLLIMPEXP void
1031 c_plenv0( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
1032           PLINT just, PLINT axis );
1033 
1034 // End current page.  Should only be used with plbop().
1035 
1036 PLDLLIMPEXP void
1037 c_pleop( void );
1038 
1039 // Plot horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i))
1040 
1041 PLDLLIMPEXP void
1042 c_plerrx( PLINT n, PLFLT_VECTOR xmin, PLFLT_VECTOR xmax, PLFLT_VECTOR y );
1043 
1044 // Plot vertical error bars (x,ymin(i)) to (x(i),ymax(i))
1045 
1046 PLDLLIMPEXP void
1047 c_plerry( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR ymin, PLFLT_VECTOR ymax );
1048 
1049 // Advance to the next family file on the next new page
1050 
1051 PLDLLIMPEXP void
1052 c_plfamadv( void );
1053 
1054 // Pattern fills the polygon bounded by the input points.
1055 
1056 PLDLLIMPEXP void
1057 c_plfill( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y );
1058 
1059 // Pattern fills the 3d polygon bounded by the input points.
1060 
1061 PLDLLIMPEXP void
1062 c_plfill3( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z );
1063 
1064 // Flushes the output stream.  Use sparingly, if at all.
1065 
1066 PLDLLIMPEXP void
1067 c_plflush( void );
1068 
1069 // Sets the global font flag to 'ifont'.
1070 
1071 PLDLLIMPEXP void
1072 c_plfont( PLINT ifont );
1073 
1074 // Load specified font set.
1075 
1076 PLDLLIMPEXP void
1077 c_plfontld( PLINT fnt );
1078 
1079 // Get character default height and current (scaled) height
1080 
1081 PLDLLIMPEXP void
1082 c_plgchr( PLFLT_NC_SCALAR p_def, PLFLT_NC_SCALAR p_ht );
1083 
1084 // Get the color map 1 range used in continuous plots
1085 
1086 PLDLLIMPEXP void
1087 c_plgcmap1_range( PLFLT_NC_SCALAR min_color, PLFLT_NC_SCALAR max_color );
1088 
1089 // Returns 8 bit RGB values for given color from color map 0
1090 
1091 PLDLLIMPEXP void
1092 c_plgcol0( PLINT icol0, PLINT_NC_SCALAR r, PLINT_NC_SCALAR g, PLINT_NC_SCALAR b );
1093 
1094 // Returns 8 bit RGB values for given color from color map 0 and alpha value
1095 
1096 PLDLLIMPEXP void
1097 c_plgcol0a( PLINT icol0, PLINT_NC_SCALAR r, PLINT_NC_SCALAR g, PLINT_NC_SCALAR b, PLFLT_NC_SCALAR alpha );
1098 
1099 // Returns the background color by 8 bit RGB value
1100 
1101 PLDLLIMPEXP void
1102 c_plgcolbg( PLINT_NC_SCALAR r, PLINT_NC_SCALAR g, PLINT_NC_SCALAR b );
1103 
1104 // Returns the background color by 8 bit RGB value and alpha value
1105 
1106 PLDLLIMPEXP void
1107 c_plgcolbga( PLINT_NC_SCALAR r, PLINT_NC_SCALAR g, PLINT_NC_SCALAR b, PLFLT_NC_SCALAR alpha );
1108 
1109 // Returns the current compression setting
1110 
1111 PLDLLIMPEXP void
1112 c_plgcompression( PLINT_NC_SCALAR compression );
1113 
1114 // Get the current device (keyword) name
1115 
1116 PLDLLIMPEXP void
1117 c_plgdev( PLCHAR_NC_VECTOR p_dev );
1118 
1119 // Retrieve current window into device space
1120 
1121 PLDLLIMPEXP void
1122 c_plgdidev( PLFLT_NC_SCALAR p_mar, PLFLT_NC_SCALAR p_aspect, PLFLT_NC_SCALAR p_jx, PLFLT_NC_SCALAR p_jy );
1123 
1124 // Get plot orientation
1125 
1126 PLDLLIMPEXP void
1127 c_plgdiori( PLFLT_NC_SCALAR p_rot );
1128 
1129 // Retrieve current window into plot space
1130 
1131 PLDLLIMPEXP void
1132 c_plgdiplt( PLFLT_NC_SCALAR p_xmin, PLFLT_NC_SCALAR p_ymin, PLFLT_NC_SCALAR p_xmax, PLFLT_NC_SCALAR p_ymax );
1133 
1134 // Get the drawing mode
1135 
1136 PLDLLIMPEXP PLINT
1137 c_plgdrawmode( void );
1138 
1139 // Get FCI (font characterization integer)
1140 
1141 PLDLLIMPEXP void
1142 c_plgfci( PLUNICODE_NC_SCALAR p_fci );
1143 
1144 // Get family file parameters
1145 
1146 PLDLLIMPEXP void
1147 c_plgfam( PLINT_NC_SCALAR p_fam, PLINT_NC_SCALAR p_num, PLINT_NC_SCALAR p_bmax );
1148 
1149 // Get the (current) output file name.  Must be preallocated to >80 bytes
1150 
1151 PLDLLIMPEXP void
1152 c_plgfnam( PLCHAR_NC_VECTOR fnam );
1153 
1154 // Get the current font family, style and weight
1155 
1156 PLDLLIMPEXP void
1157 c_plgfont( PLINT_NC_SCALAR p_family, PLINT_NC_SCALAR p_style, PLINT_NC_SCALAR p_weight );
1158 
1159 // Get the (current) run level.
1160 
1161 PLDLLIMPEXP void
1162 c_plglevel( PLINT_NC_SCALAR p_level );
1163 
1164 // Get output device parameters.
1165 
1166 PLDLLIMPEXP void
1167 c_plgpage( PLFLT_NC_SCALAR p_xp, PLFLT_NC_SCALAR p_yp,
1168            PLINT_NC_SCALAR p_xleng, PLINT_NC_SCALAR p_yleng, PLINT_NC_SCALAR p_xoff, PLINT_NC_SCALAR p_yoff );
1169 
1170 // Switches to graphics screen.
1171 
1172 PLDLLIMPEXP void
1173 c_plgra( void );
1174 
1175 // Draw gradient in polygon.
1176 
1177 PLDLLIMPEXP void
1178 c_plgradient( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT angle );
1179 
1180 // grid irregularly sampled data
1181 
1182 PLDLLIMPEXP void
1183 c_plgriddata( PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z, PLINT npts,
1184               PLFLT_VECTOR xg, PLINT nptsx, PLFLT_VECTOR yg, PLINT nptsy,
1185               PLFLT_NC_MATRIX zg, PLINT type, PLFLT data );
1186 
1187 PLDLLIMPEXP void
1188 plfgriddata( PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z, PLINT npts,
1189              PLFLT_VECTOR xg, PLINT nptsx, PLFLT_VECTOR yg, PLINT nptsy,
1190              PLF2OPS zops, PLPointer zgp, PLINT type, PLFLT data );
1191 
1192 // type of gridding algorithm for plgriddata()
1193 
1194 #define GRID_CSA       1 // Bivariate Cubic Spline approximation
1195 #define GRID_DTLI      2 // Delaunay Triangulation Linear Interpolation
1196 #define GRID_NNI       3 // Natural Neighbors Interpolation
1197 #define GRID_NNIDW     4 // Nearest Neighbors Inverse Distance Weighted
1198 #define GRID_NNLI      5 // Nearest Neighbors Linear Interpolation
1199 #define GRID_NNAIDW    6 // Nearest Neighbors Around Inverse Distance Weighted
1200 
1201 // Get subpage boundaries in absolute coordinates
1202 
1203 PLDLLIMPEXP void
1204 c_plgspa( PLFLT_NC_SCALAR xmin, PLFLT_NC_SCALAR xmax, PLFLT_NC_SCALAR ymin, PLFLT_NC_SCALAR ymax );
1205 
1206 // Get current stream number.
1207 
1208 PLDLLIMPEXP void
1209 c_plgstrm( PLINT_NC_SCALAR p_strm );
1210 
1211 // Get the current library version number
1212 
1213 PLDLLIMPEXP void
1214 c_plgver( PLCHAR_NC_VECTOR p_ver );
1215 
1216 // Get viewport boundaries in normalized device coordinates
1217 
1218 PLDLLIMPEXP void
1219 c_plgvpd( PLFLT_NC_SCALAR p_xmin, PLFLT_NC_SCALAR p_xmax, PLFLT_NC_SCALAR p_ymin, PLFLT_NC_SCALAR p_ymax );
1220 
1221 // Get viewport boundaries in world coordinates
1222 
1223 PLDLLIMPEXP void
1224 c_plgvpw( PLFLT_NC_SCALAR p_xmin, PLFLT_NC_SCALAR p_xmax, PLFLT_NC_SCALAR p_ymin, PLFLT_NC_SCALAR p_ymax );
1225 
1226 // Get x axis labeling parameters
1227 
1228 PLDLLIMPEXP void
1229 c_plgxax( PLINT_NC_SCALAR p_digmax, PLINT_NC_SCALAR p_digits );
1230 
1231 // Get y axis labeling parameters
1232 
1233 PLDLLIMPEXP void
1234 c_plgyax( PLINT_NC_SCALAR p_digmax, PLINT_NC_SCALAR p_digits );
1235 
1236 // Get z axis labeling parameters
1237 
1238 PLDLLIMPEXP void
1239 c_plgzax( PLINT_NC_SCALAR p_digmax, PLINT_NC_SCALAR p_digits );
1240 
1241 // Draws a histogram of n values of a variable in array data[0..n-1]
1242 
1243 // Flags for plhist() - opt argument; note: some flags are passed to
1244 // plbin() for the actual plotting
1245 #define PL_HIST_DEFAULT            0x00
1246 #define PL_HIST_NOSCALING          0x01
1247 #define PL_HIST_IGNORE_OUTLIERS    0x02
1248 #define PL_HIST_NOEXPAND           0x08
1249 #define PL_HIST_NOEMPTY            0x10
1250 
1251 PLDLLIMPEXP void
1252 c_plhist( PLINT n, PLFLT_VECTOR data, PLFLT datmin, PLFLT datmax,
1253           PLINT nbin, PLINT opt );
1254 
1255 // Functions for converting between HLS and RGB color space
1256 
1257 PLDLLIMPEXP void
1258 c_plhlsrgb( PLFLT h, PLFLT l, PLFLT s, PLFLT_NC_SCALAR p_r, PLFLT_NC_SCALAR p_g, PLFLT_NC_SCALAR p_b );
1259 
1260 // Initializes PLplot, using preset or default options
1261 
1262 PLDLLIMPEXP void
1263 c_plinit( void );
1264 
1265 // Draws a line segment from (x1, y1) to (x2, y2).
1266 
1267 PLDLLIMPEXP void
1268 c_pljoin( PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 );
1269 
1270 // Simple routine for labelling graphs.
1271 
1272 PLDLLIMPEXP void
1273 c_pllab( PLCHAR_VECTOR xlabel, PLCHAR_VECTOR ylabel, PLCHAR_VECTOR tlabel );
1274 
1275 //flags used for position argument of both pllegend and plcolorbar
1276 #define PL_POSITION_NULL             0x0
1277 #define PL_POSITION_LEFT             0x1
1278 #define PL_POSITION_RIGHT            0x2
1279 #define PL_POSITION_TOP              0x4
1280 #define PL_POSITION_BOTTOM           0x8
1281 #define PL_POSITION_INSIDE           0x10
1282 #define PL_POSITION_OUTSIDE          0x20
1283 #define PL_POSITION_VIEWPORT         0x40
1284 #define PL_POSITION_SUBPAGE          0x80
1285 
1286 // Flags for pllegend.
1287 #define PL_LEGEND_NULL               0x0
1288 #define PL_LEGEND_NONE               0x1
1289 #define PL_LEGEND_COLOR_BOX          0x2
1290 #define PL_LEGEND_LINE               0x4
1291 #define PL_LEGEND_SYMBOL             0x8
1292 #define PL_LEGEND_TEXT_LEFT          0x10
1293 #define PL_LEGEND_BACKGROUND         0x20
1294 #define PL_LEGEND_BOUNDING_BOX       0x40
1295 #define PL_LEGEND_ROW_MAJOR          0x80
1296 
1297 // Flags for plcolorbar
1298 #define PL_COLORBAR_NULL             0x0
1299 #define PL_COLORBAR_LABEL_LEFT       0x1
1300 #define PL_COLORBAR_LABEL_RIGHT      0x2
1301 #define PL_COLORBAR_LABEL_TOP        0x4
1302 #define PL_COLORBAR_LABEL_BOTTOM     0x8
1303 #define PL_COLORBAR_IMAGE            0x10
1304 #define PL_COLORBAR_SHADE            0x20
1305 #define PL_COLORBAR_GRADIENT         0x40
1306 #define PL_COLORBAR_CAP_NONE         0x80
1307 #define PL_COLORBAR_CAP_LOW          0x100
1308 #define PL_COLORBAR_CAP_HIGH         0x200
1309 #define PL_COLORBAR_SHADE_LABEL      0x400
1310 #define PL_COLORBAR_ORIENT_RIGHT     0x800
1311 #define PL_COLORBAR_ORIENT_TOP       0x1000
1312 #define PL_COLORBAR_ORIENT_LEFT      0x2000
1313 #define PL_COLORBAR_ORIENT_BOTTOM    0x4000
1314 #define PL_COLORBAR_BACKGROUND       0x8000
1315 #define PL_COLORBAR_BOUNDING_BOX     0x10000
1316 
1317 // Flags for drawing mode
1318 #define PL_DRAWMODE_UNKNOWN          0x0
1319 #define PL_DRAWMODE_DEFAULT          0x1
1320 #define PL_DRAWMODE_REPLACE          0x2
1321 #define PL_DRAWMODE_XOR              0x4
1322 
1323 // Routine for drawing discrete line, symbol, or cmap0 legends
1324 PLDLLIMPEXP void
1325 c_pllegend( PLFLT_NC_SCALAR p_legend_width, PLFLT_NC_SCALAR p_legend_height,
1326             PLINT opt, PLINT position, PLFLT x, PLFLT y, PLFLT plot_width,
1327             PLINT bg_color, PLINT bb_color, PLINT bb_style,
1328             PLINT nrow, PLINT ncolumn,
1329             PLINT nlegend, PLINT_VECTOR opt_array,
1330             PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing,
1331             PLFLT text_justification,
1332             PLINT_VECTOR text_colors, PLCHAR_MATRIX text,
1333             PLINT_VECTOR box_colors, PLINT_VECTOR box_patterns,
1334             PLFLT_VECTOR box_scales, PLFLT_VECTOR box_line_widths,
1335             PLINT_VECTOR line_colors, PLINT_VECTOR line_styles,
1336             PLFLT_VECTOR line_widths,
1337             PLINT_VECTOR symbol_colors, PLFLT_VECTOR symbol_scales,
1338             PLINT_VECTOR symbol_numbers, PLCHAR_MATRIX symbols );
1339 
1340 // Routine for drawing continuous colour legends
1341 PLDLLIMPEXP void
1342 c_plcolorbar( PLFLT_NC_SCALAR p_colorbar_width, PLFLT_NC_SCALAR p_colorbar_height,
1343               PLINT opt, PLINT position, PLFLT x, PLFLT y,
1344               PLFLT x_length, PLFLT y_length,
1345               PLINT bg_color, PLINT bb_color, PLINT bb_style,
1346               PLFLT low_cap_color, PLFLT high_cap_color,
1347               PLINT cont_color, PLFLT cont_width,
1348               PLINT n_labels, PLINT_VECTOR label_opts, PLCHAR_MATRIX labels,
1349               PLINT n_axes, PLCHAR_MATRIX axis_opts,
1350               PLFLT_VECTOR ticks, PLINT_VECTOR sub_ticks,
1351               PLINT_VECTOR n_values, PLFLT_MATRIX values );
1352 
1353 // Sets position of the light source
1354 PLDLLIMPEXP void
1355 c_pllightsource( PLFLT x, PLFLT y, PLFLT z );
1356 
1357 // Draws line segments connecting a series of points.
1358 
1359 PLDLLIMPEXP void
1360 c_plline( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y );
1361 
1362 // Draws a line in 3 space.
1363 
1364 PLDLLIMPEXP void
1365 c_plline3( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z );
1366 
1367 // Set line style.
1368 
1369 PLDLLIMPEXP void
1370 c_pllsty( PLINT lin );
1371 
1372 // Plot continental outline in world coordinates
1373 
1374 PLDLLIMPEXP void
1375 c_plmap( PLMAPFORM_callback mapform, PLCHAR_VECTOR name,
1376          PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy );
1377 
1378 // Plot map outlines
1379 
1380 PLDLLIMPEXP void
1381 c_plmapline( PLMAPFORM_callback mapform, PLCHAR_VECTOR name,
1382              PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy,
1383              PLINT_VECTOR plotentries, PLINT nplotentries );
1384 
1385 // Plot map points
1386 
1387 PLDLLIMPEXP void
1388 c_plmapstring( PLMAPFORM_callback mapform,
1389                PLCHAR_VECTOR name, PLCHAR_VECTOR string,
1390                PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy,
1391                PLINT_VECTOR plotentries, PLINT nplotentries );
1392 
1393 // Plot map text
1394 
1395 PLDLLIMPEXP void
1396 c_plmaptex( PLMAPFORM_callback mapform,
1397             PLCHAR_VECTOR name, PLFLT dx, PLFLT dy, PLFLT just, PLCHAR_VECTOR text,
1398             PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy,
1399             PLINT plotentry );
1400 
1401 // Plot map fills
1402 
1403 PLDLLIMPEXP void
1404 c_plmapfill( PLMAPFORM_callback mapform,
1405              PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy,
1406              PLINT_VECTOR plotentries, PLINT nplotentries );
1407 
1408 // Plot the latitudes and longitudes on the background.
1409 
1410 PLDLLIMPEXP void
1411 c_plmeridians( PLMAPFORM_callback mapform,
1412                PLFLT dlong, PLFLT dlat,
1413                PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat );
1414 
1415 // Plots a mesh representation of the function z[x][y].
1416 
1417 PLDLLIMPEXP void
1418 c_plmesh( PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_MATRIX z, PLINT nx, PLINT ny, PLINT opt );
1419 
1420 // Like plmesh, but uses an evaluator function to access z data from zp
1421 
1422 PLDLLIMPEXP void
1423 plfmesh( PLFLT_VECTOR x, PLFLT_VECTOR y, PLF2OPS zops, PLPointer zp,
1424          PLINT nx, PLINT ny, PLINT opt );
1425 
1426 // Plots a mesh representation of the function z[x][y] with contour
1427 
1428 PLDLLIMPEXP void
1429 c_plmeshc( PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_MATRIX z, PLINT nx, PLINT ny, PLINT opt,
1430            PLFLT_VECTOR clevel, PLINT nlevel );
1431 
1432 // Like plmeshc, but uses an evaluator function to access z data from zp
1433 
1434 PLDLLIMPEXP void
1435 plfmeshc( PLFLT_VECTOR x, PLFLT_VECTOR y, PLF2OPS zops, PLPointer zp,
1436           PLINT nx, PLINT ny, PLINT opt, PLFLT_VECTOR clevel, PLINT nlevel );
1437 
1438 // Creates a new stream and makes it the default.
1439 
1440 PLDLLIMPEXP void
1441 c_plmkstrm( PLINT_NC_SCALAR p_strm );
1442 
1443 // Prints out "text" at specified position relative to viewport
1444 
1445 PLDLLIMPEXP void
1446 c_plmtex( PLCHAR_VECTOR side, PLFLT disp, PLFLT pos, PLFLT just,
1447           PLCHAR_VECTOR text );
1448 
1449 // Prints out "text" at specified position relative to viewport (3D)
1450 
1451 PLDLLIMPEXP void
1452 c_plmtex3( PLCHAR_VECTOR side, PLFLT disp, PLFLT pos, PLFLT just,
1453            PLCHAR_VECTOR text );
1454 
1455 // Plots a 3-d representation of the function z[x][y].
1456 
1457 PLDLLIMPEXP void
1458 c_plot3d( PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_MATRIX z,
1459           PLINT nx, PLINT ny, PLINT opt, PLBOOL side );
1460 
1461 // Like plot3d, but uses an evaluator function to access z data from zp
1462 
1463 PLDLLIMPEXP void
1464 plfplot3d( PLFLT_VECTOR x, PLFLT_VECTOR y, PLF2OPS zops, PLPointer zp,
1465            PLINT nx, PLINT ny, PLINT opt, PLBOOL side );
1466 
1467 // Plots a 3-d representation of the function z[x][y] with contour.
1468 
1469 PLDLLIMPEXP void
1470 c_plot3dc( PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_MATRIX z,
1471            PLINT nx, PLINT ny, PLINT opt,
1472            PLFLT_VECTOR clevel, PLINT nlevel );
1473 
1474 // Like plot3dc, but uses an evaluator function to access z data from zp
1475 
1476 PLDLLIMPEXP void
1477 plfplot3dc( PLFLT_VECTOR x, PLFLT_VECTOR y, PLF2OPS zops, PLPointer zp,
1478             PLINT nx, PLINT ny, PLINT opt, PLFLT_VECTOR clevel, PLINT nlevel );
1479 
1480 // Plots a 3-d representation of the function z[x][y] with contour and
1481 // y index limits.
1482 
1483 PLDLLIMPEXP void
1484 c_plot3dcl( PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_MATRIX z,
1485             PLINT nx, PLINT ny, PLINT opt,
1486             PLFLT_VECTOR clevel, PLINT nlevel,
1487             PLINT indexxmin, PLINT indexxmax, PLINT_VECTOR indexymin, PLINT_VECTOR indexymax );
1488 
1489 // Like plot3dcl, but uses an evaluator function to access z data from zp
1490 
1491 PLDLLIMPEXP void
1492 plfplot3dcl( PLFLT_VECTOR x, PLFLT_VECTOR y, PLF2OPS zops, PLPointer zp,
1493              PLINT nx, PLINT ny, PLINT opt,
1494              PLFLT_VECTOR clevel, PLINT nlevel,
1495              PLINT indexxmin, PLINT indexxmax, PLINT_VECTOR indexymin, PLINT_VECTOR indexymax );
1496 
1497 //
1498 // definitions for the opt argument in plot3dc() and plsurf3d()
1499 //
1500 // DRAW_LINEX *must* be 1 and DRAW_LINEY *must* be 2, because of legacy code!
1501 //
1502 
1503 #define DRAW_LINEX     0x001  // draw lines parallel to the X axis
1504 #define DRAW_LINEY     0x002  // draw lines parallel to the Y axis
1505 #define DRAW_LINEXY    0x003  // draw lines parallel to both the X and Y axis
1506 #define MAG_COLOR      0x004  // draw the mesh with a color dependent of the magnitude
1507 #define BASE_CONT      0x008  // draw contour plot at bottom xy plane
1508 #define TOP_CONT       0x010  // draw contour plot at top xy plane
1509 #define SURF_CONT      0x020  // draw contour plot at surface
1510 #define DRAW_SIDES     0x040  // draw sides
1511 #define FACETED        0x080  // draw outline for each square that makes up the surface
1512 #define MESH           0x100  // draw mesh
1513 
1514 //
1515 //  valid options for plot3dc():
1516 //
1517 //  DRAW_SIDES, BASE_CONT, TOP_CONT (not yet),
1518 //  MAG_COLOR, DRAW_LINEX, DRAW_LINEY, DRAW_LINEXY.
1519 //
1520 //  valid options for plsurf3d():
1521 //
1522 //  MAG_COLOR, BASE_CONT, SURF_CONT, FACETED, DRAW_SIDES.
1523 //
1524 
1525 // Set fill pattern directly.
1526 
1527 PLDLLIMPEXP void
1528 c_plpat( PLINT nlin, PLINT_VECTOR inc, PLINT_VECTOR del );
1529 
1530 // Draw a line connecting two points, accounting for coordinate transforms
1531 
1532 PLDLLIMPEXP void
1533 c_plpath( PLINT n, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2 );
1534 
1535 // Plots array y against x for n points using ASCII code "code".
1536 
1537 PLDLLIMPEXP void
1538 c_plpoin( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLINT code );
1539 
1540 // Draws a series of points in 3 space.
1541 
1542 PLDLLIMPEXP void
1543 c_plpoin3( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z, PLINT code );
1544 
1545 // Draws a polygon in 3 space.
1546 
1547 PLDLLIMPEXP void
1548 c_plpoly3( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z, PLBOOL_VECTOR draw, PLBOOL ifcc );
1549 
1550 // Set the floating point precision (in number of places) in numeric labels.
1551 
1552 PLDLLIMPEXP void
1553 c_plprec( PLINT setp, PLINT prec );
1554 
1555 // Set fill pattern, using one of the predefined patterns.
1556 
1557 PLDLLIMPEXP void
1558 c_plpsty( PLINT patt );
1559 
1560 // Prints out "text" at world cooordinate (x,y).
1561 
1562 PLDLLIMPEXP void
1563 c_plptex( PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, PLCHAR_VECTOR text );
1564 
1565 // Prints out "text" at world cooordinate (x,y,z).
1566 
1567 PLDLLIMPEXP void
1568 c_plptex3( PLFLT wx, PLFLT wy, PLFLT wz, PLFLT dx, PLFLT dy, PLFLT dz,
1569            PLFLT sx, PLFLT sy, PLFLT sz, PLFLT just, PLCHAR_VECTOR text );
1570 
1571 // Random number generator based on Mersenne Twister.
1572 // Obtain real random number in range [0,1].
1573 
1574 PLDLLIMPEXP PLFLT
1575 c_plrandd( void );
1576 
1577 // Replays contents of plot buffer to current device/file.
1578 
1579 PLDLLIMPEXP void
1580 c_plreplot( void );
1581 
1582 // Functions for converting between HLS and RGB color space
1583 
1584 PLDLLIMPEXP void
1585 c_plrgbhls( PLFLT r, PLFLT g, PLFLT b, PLFLT_NC_SCALAR p_h, PLFLT_NC_SCALAR p_l, PLFLT_NC_SCALAR p_s );
1586 
1587 // Set character height.
1588 
1589 PLDLLIMPEXP void
1590 c_plschr( PLFLT def, PLFLT scale );
1591 
1592 // Set color map 0 colors by 8 bit RGB values
1593 
1594 PLDLLIMPEXP void
1595 c_plscmap0( PLINT_VECTOR r, PLINT_VECTOR g, PLINT_VECTOR b, PLINT ncol0 );
1596 
1597 // Set color map 0 colors by 8 bit RGB values and alpha values
1598 
1599 PLDLLIMPEXP void
1600 c_plscmap0a( PLINT_VECTOR r, PLINT_VECTOR g, PLINT_VECTOR b, PLFLT_VECTOR alpha, PLINT ncol0 );
1601 
1602 // Set number of colors in cmap 0
1603 
1604 PLDLLIMPEXP void
1605 c_plscmap0n( PLINT ncol0 );
1606 
1607 // Set color map 1 colors by 8 bit RGB values
1608 
1609 PLDLLIMPEXP void
1610 c_plscmap1( PLINT_VECTOR r, PLINT_VECTOR g, PLINT_VECTOR b, PLINT ncol1 );
1611 
1612 // Set color map 1 colors by 8 bit RGB and alpha values
1613 
1614 PLDLLIMPEXP void
1615 c_plscmap1a( PLINT_VECTOR r, PLINT_VECTOR g, PLINT_VECTOR b, PLFLT_VECTOR alpha, PLINT ncol1 );
1616 
1617 // Set color map 1 colors using a piece-wise linear relationship between
1618 // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
1619 
1620 PLDLLIMPEXP void
1621 c_plscmap1l( PLBOOL itype, PLINT npts, PLFLT_VECTOR intensity,
1622              PLFLT_VECTOR coord1, PLFLT_VECTOR coord2, PLFLT_VECTOR coord3, PLBOOL_VECTOR alt_hue_path );
1623 
1624 // Set color map 1 colors using a piece-wise linear relationship between
1625 // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
1626 // Will also linear interpolate alpha values.
1627 
1628 PLDLLIMPEXP void
1629 c_plscmap1la( PLBOOL itype, PLINT npts, PLFLT_VECTOR intensity,
1630               PLFLT_VECTOR coord1, PLFLT_VECTOR coord2, PLFLT_VECTOR coord3, PLFLT_VECTOR alpha, PLBOOL_VECTOR alt_hue_path );
1631 
1632 // Set number of colors in cmap 1
1633 
1634 PLDLLIMPEXP void
1635 c_plscmap1n( PLINT ncol1 );
1636 
1637 // Set the color map 1 range used in continuous plots
1638 
1639 PLDLLIMPEXP void
1640 c_plscmap1_range( PLFLT min_color, PLFLT max_color );
1641 
1642 // Set a given color from color map 0 by 8 bit RGB value
1643 
1644 PLDLLIMPEXP void
1645 c_plscol0( PLINT icol0, PLINT r, PLINT g, PLINT b );
1646 
1647 // Set a given color from color map 0 by 8 bit RGB value
1648 
1649 PLDLLIMPEXP void
1650 c_plscol0a( PLINT icol0, PLINT r, PLINT g, PLINT b, PLFLT alpha );
1651 
1652 // Set the background color by 8 bit RGB value
1653 
1654 PLDLLIMPEXP void
1655 c_plscolbg( PLINT r, PLINT g, PLINT b );
1656 
1657 // Set the background color by 8 bit RGB value and alpha value
1658 
1659 PLDLLIMPEXP void
1660 c_plscolbga( PLINT r, PLINT g, PLINT b, PLFLT alpha );
1661 
1662 // Used to globally turn color output on/off
1663 
1664 PLDLLIMPEXP void
1665 c_plscolor( PLINT color );
1666 
1667 // Set the compression level
1668 
1669 PLDLLIMPEXP void
1670 c_plscompression( PLINT compression );
1671 
1672 // Set the device (keyword) name
1673 
1674 PLDLLIMPEXP void
1675 c_plsdev( PLCHAR_VECTOR devname );
1676 
1677 // Set window into device space using margin, aspect ratio, and
1678 // justification
1679 
1680 PLDLLIMPEXP void
1681 c_plsdidev( PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy );
1682 
1683 // Set up transformation from metafile coordinates.
1684 
1685 PLDLLIMPEXP void
1686 c_plsdimap( PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax,
1687             PLFLT dimxpmm, PLFLT dimypmm );
1688 
1689 // Set plot orientation, specifying rotation in units of pi/2.
1690 
1691 PLDLLIMPEXP void
1692 c_plsdiori( PLFLT rot );
1693 
1694 // Set window into plot space
1695 
1696 PLDLLIMPEXP void
1697 c_plsdiplt( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax );
1698 
1699 // Set window into plot space incrementally (zoom)
1700 
1701 PLDLLIMPEXP void
1702 c_plsdiplz( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax );
1703 
1704 // Set the drawing mode
1705 PLDLLIMPEXP void
1706 c_plsdrawmode( PLINT mode );
1707 
1708 // Set seed for internal random number generator
1709 
1710 PLDLLIMPEXP void
1711 c_plseed( unsigned int seed );
1712 
1713 // Set the escape character for text strings.
1714 
1715 PLDLLIMPEXP void
1716 c_plsesc( char esc );
1717 
1718 // Set family file parameters
1719 
1720 PLDLLIMPEXP void
1721 c_plsfam( PLINT fam, PLINT num, PLINT bmax );
1722 
1723 // Set FCI (font characterization integer)
1724 
1725 PLDLLIMPEXP void
1726 c_plsfci( PLUNICODE fci );
1727 
1728 // Set the output file name.
1729 
1730 PLDLLIMPEXP void
1731 c_plsfnam( PLCHAR_VECTOR fnam );
1732 
1733 // Set the current font family, style and weight
1734 
1735 PLDLLIMPEXP void
1736 c_plsfont( PLINT family, PLINT style, PLINT weight );
1737 
1738 // Shade region.
1739 
1740 PLDLLIMPEXP void
1741 c_plshade( PLFLT_MATRIX a, PLINT nx, PLINT ny, PLDEFINED_callback defined,
1742            PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
1743            PLFLT shade_min, PLFLT shade_max,
1744            PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
1745            PLINT min_color, PLFLT min_width,
1746            PLINT max_color, PLFLT max_width,
1747            PLFILL_callback fill, PLBOOL rectangular,
1748            PLTRANSFORM_callback pltr, PLPointer pltr_data );
1749 
1750 #ifdef PL_DEPRECATED
1751 PLDLLIMPEXP void
1752 c_plshade1( PLFLT_FE_POINTER a, PLINT nx, PLINT ny, PLDEFINED_callback defined,
1753             PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
1754             PLFLT shade_min, PLFLT shade_max,
1755             PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
1756             PLINT min_color, PLFLT min_width,
1757             PLINT max_color, PLFLT max_width,
1758             PLFILL_callback fill, PLBOOL rectangular,
1759             PLTRANSFORM_callback pltr, PLPointer pltr_data );
1760 #endif // PL_DEPRECATED
1761 
1762 PLDLLIMPEXP void
1763 c_plshades( PLFLT_MATRIX a, PLINT nx, PLINT ny, PLDEFINED_callback defined,
1764             PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
1765             PLFLT_VECTOR clevel, PLINT nlevel, PLFLT fill_width,
1766             PLINT cont_color, PLFLT cont_width,
1767             PLFILL_callback fill, PLBOOL rectangular,
1768             PLTRANSFORM_callback pltr, PLPointer pltr_data );
1769 
1770 PLDLLIMPEXP void
1771 plfshades( PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny,
1772            PLDEFINED_callback defined,
1773            PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
1774            PLFLT_VECTOR clevel, PLINT nlevel, PLFLT fill_width,
1775            PLINT cont_color, PLFLT cont_width,
1776            PLFILL_callback fill, PLINT rectangular,
1777            PLTRANSFORM_callback pltr, PLPointer pltr_data );
1778 
1779 PLDLLIMPEXP void
1780 plfshade( PLF2EVAL_callback f2eval, PLPointer f2eval_data,
1781           PLF2EVAL_callback c2eval, PLPointer c2eval_data,
1782           PLINT nx, PLINT ny,
1783           PLFLT left, PLFLT right, PLFLT bottom, PLFLT top,
1784           PLFLT shade_min, PLFLT shade_max,
1785           PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
1786           PLINT min_color, PLFLT min_width,
1787           PLINT max_color, PLFLT max_width,
1788           PLFILL_callback fill, PLBOOL rectangular,
1789           PLTRANSFORM_callback pltr, PLPointer pltr_data );
1790 
1791 PLDLLIMPEXP void
1792 plfshade1( PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny,
1793            PLDEFINED_callback defined,
1794            PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
1795            PLFLT shade_min, PLFLT shade_max,
1796            PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width,
1797            PLINT min_color, PLFLT min_width,
1798            PLINT max_color, PLFLT max_width,
1799            PLFILL_callback fill, PLINT rectangular,
1800            PLTRANSFORM_callback pltr, PLPointer pltr_data );
1801 
1802 // Setup a user-provided custom labeling function
1803 
1804 PLDLLIMPEXP void
1805 c_plslabelfunc( PLLABEL_FUNC_callback label_func, PLPointer label_data );
1806 
1807 // Set up lengths of major tick marks.
1808 
1809 PLDLLIMPEXP void
1810 c_plsmaj( PLFLT def, PLFLT scale );
1811 
1812 // Set the RGB memory area to be plotted (with the 'mem' or 'memcairo' drivers)
1813 
1814 PLDLLIMPEXP void
1815 c_plsmem( PLINT maxx, PLINT maxy, PLPointer plotmem );
1816 
1817 // Set the RGBA memory area to be plotted (with the 'memcairo' driver)
1818 
1819 PLDLLIMPEXP void
1820 c_plsmema( PLINT maxx, PLINT maxy, PLPointer plotmem );
1821 
1822 // Set up lengths of minor tick marks.
1823 
1824 PLDLLIMPEXP void
1825 c_plsmin( PLFLT def, PLFLT scale );
1826 
1827 // Set orientation.  Must be done before calling plinit.
1828 
1829 PLDLLIMPEXP void
1830 c_plsori( PLINT ori );
1831 
1832 // Set output device parameters.  Usually ignored by the driver.
1833 
1834 PLDLLIMPEXP void
1835 c_plspage( PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng,
1836            PLINT xoff, PLINT yoff );
1837 
1838 // Set the colors for color table 0 from a cmap0 file
1839 
1840 PLDLLIMPEXP void
1841 c_plspal0( PLCHAR_VECTOR filename );
1842 
1843 // Set the colors for color table 1 from a cmap1 file
1844 
1845 PLDLLIMPEXP void
1846 c_plspal1( PLCHAR_VECTOR filename, PLBOOL interpolate );
1847 
1848 // Set the pause (on end-of-page) status
1849 
1850 PLDLLIMPEXP void
1851 c_plspause( PLBOOL pause );
1852 
1853 // Set stream number.
1854 
1855 PLDLLIMPEXP void
1856 c_plsstrm( PLINT strm );
1857 
1858 // Set the number of subwindows in x and y
1859 
1860 PLDLLIMPEXP void
1861 c_plssub( PLINT nx, PLINT ny );
1862 
1863 // Set symbol height.
1864 
1865 PLDLLIMPEXP void
1866 c_plssym( PLFLT def, PLFLT scale );
1867 
1868 // Initialize PLplot, passing in the windows/page settings.
1869 
1870 PLDLLIMPEXP void
1871 c_plstar( PLINT nx, PLINT ny );
1872 
1873 // Initialize PLplot, passing the device name and windows/page settings.
1874 
1875 PLDLLIMPEXP void
1876 c_plstart( PLCHAR_VECTOR devname, PLINT nx, PLINT ny );
1877 
1878 // Set the coordinate transform
1879 
1880 PLDLLIMPEXP void
1881 c_plstransform( PLTRANSFORM_callback coordinate_transform, PLPointer coordinate_transform_data );
1882 
1883 // Prints out the same string repeatedly at the n points in world
1884 // coordinates given by the x and y arrays.  Supersedes plpoin and
1885 // plsymbol for the case where text refers to a unicode glyph either
1886 // directly as UTF-8 or indirectly via the standard text escape
1887 // sequences allowed for PLplot input strings.
1888 
1889 PLDLLIMPEXP void
1890 c_plstring( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLCHAR_VECTOR string );
1891 
1892 // Prints out the same string repeatedly at the n points in world
1893 // coordinates given by the x, y, and z arrays.  Supersedes plpoin3
1894 // for the case where text refers to a unicode glyph either directly
1895 // as UTF-8 or indirectly via the standard text escape sequences
1896 // allowed for PLplot input strings.
1897 
1898 PLDLLIMPEXP void
1899 c_plstring3( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z, PLCHAR_VECTOR string );
1900 
1901 // Add a point to a stripchart.
1902 
1903 PLDLLIMPEXP void
1904 c_plstripa( PLINT id, PLINT pen, PLFLT x, PLFLT y );
1905 
1906 // Create 1d stripchart
1907 
1908 PLDLLIMPEXP void
1909 c_plstripc( PLINT_NC_SCALAR id, PLCHAR_VECTOR xspec, PLCHAR_VECTOR yspec,
1910             PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax,
1911             PLFLT xlpos, PLFLT ylpos,
1912             PLBOOL y_ascl, PLBOOL acc,
1913             PLINT colbox, PLINT collab,
1914             PLINT_VECTOR colline, PLINT_VECTOR styline, PLCHAR_MATRIX legline,
1915             PLCHAR_VECTOR labx, PLCHAR_VECTOR laby, PLCHAR_VECTOR labtop );
1916 
1917 // Deletes and releases memory used by a stripchart.
1918 
1919 PLDLLIMPEXP void
1920 c_plstripd( PLINT id );
1921 
1922 // plots a 2d image (or a matrix too large for plshade() )
1923 
1924 PLDLLIMPEXP void
1925 c_plimagefr( PLFLT_MATRIX idata, PLINT nx, PLINT ny,
1926              PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax,
1927              PLFLT valuemin, PLFLT valuemax,
1928              PLTRANSFORM_callback pltr, PLPointer pltr_data );
1929 
1930 //
1931 // Like plimagefr, but uses an evaluator function to access image data from
1932 // idatap.  getminmax is only used if zmin == zmax.
1933 //
1934 
1935 PLDLLIMPEXP void
1936 plfimagefr( PLF2OPS idataops, PLPointer idatap, PLINT nx, PLINT ny,
1937             PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax,
1938             PLFLT valuemin, PLFLT valuemax,
1939             PLTRANSFORM_callback pltr, PLPointer pltr_data );
1940 
1941 // plots a 2d image (or a matrix too large for plshade() ) - colors
1942 // automatically scaled
1943 
1944 PLDLLIMPEXP void
1945 c_plimage( PLFLT_MATRIX idata, PLINT nx, PLINT ny,
1946            PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax,
1947            PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax );
1948 
1949 //
1950 // Like plimage, but uses an operator functions to access image data from
1951 // idatap.
1952 //
1953 
1954 PLDLLIMPEXP void
1955 plfimage( PLF2OPS idataops, PLPointer idatap, PLINT nx, PLINT ny,
1956           PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax,
1957           PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax );
1958 
1959 // Set up a new line style
1960 
1961 PLDLLIMPEXP void
1962 c_plstyl( PLINT nms, PLINT_VECTOR mark, PLINT_VECTOR space );
1963 
1964 // Plots the 3d surface representation of the function z[x][y].
1965 
1966 PLDLLIMPEXP void
1967 c_plsurf3d( PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_MATRIX z, PLINT nx, PLINT ny,
1968             PLINT opt, PLFLT_VECTOR clevel, PLINT nlevel );
1969 
1970 // Like plsurf3d, but uses an evaluator function to access z data from zp
1971 
1972 PLDLLIMPEXP void
1973 plfsurf3d( PLFLT_VECTOR x, PLFLT_VECTOR y, PLF2OPS zops, PLPointer zp,
1974            PLINT nx, PLINT ny, PLINT opt, PLFLT_VECTOR clevel, PLINT nlevel );
1975 
1976 // Plots the 3d surface representation of the function z[x][y] with y
1977 // index limits.
1978 
1979 PLDLLIMPEXP void
1980 c_plsurf3dl( PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_MATRIX z, PLINT nx, PLINT ny,
1981              PLINT opt, PLFLT_VECTOR clevel, PLINT nlevel,
1982              PLINT indexxmin, PLINT indexxmax, PLINT_VECTOR indexymin, PLINT_VECTOR indexymax );
1983 
1984 // Like plsurf3dl, but uses an evaluator function to access z data from zp
1985 
1986 PLDLLIMPEXP void
1987 plfsurf3dl( PLFLT_VECTOR x, PLFLT_VECTOR y, PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny,
1988             PLINT opt, PLFLT_VECTOR clevel, PLINT nlevel,
1989             PLINT indexxmin, PLINT indexxmax, PLINT_VECTOR indexymin, PLINT_VECTOR indexymax );
1990 
1991 // Set arrow style for vector plots.
1992 PLDLLIMPEXP void
1993 c_plsvect( PLFLT_VECTOR arrowx, PLFLT_VECTOR arrowy, PLINT npts, PLBOOL fill );
1994 
1995 // Sets the edges of the viewport to the specified absolute coordinates
1996 
1997 PLDLLIMPEXP void
1998 c_plsvpa( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax );
1999 
2000 // Set x axis labeling parameters
2001 
2002 PLDLLIMPEXP void
2003 c_plsxax( PLINT digmax, PLINT digits );
2004 
2005 // Set inferior X window
2006 
2007 PLDLLIMPEXP void
2008 plsxwin( PLINT window_id );
2009 
2010 // Set y axis labeling parameters
2011 
2012 PLDLLIMPEXP void
2013 c_plsyax( PLINT digmax, PLINT digits );
2014 
2015 // Plots array y against x for n points using Hershey symbol "code"
2016 
2017 PLDLLIMPEXP void
2018 c_plsym( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLINT code );
2019 
2020 // Set z axis labeling parameters
2021 
2022 PLDLLIMPEXP void
2023 c_plszax( PLINT digmax, PLINT digits );
2024 
2025 // Switches to text screen.
2026 
2027 PLDLLIMPEXP void
2028 c_pltext( void );
2029 
2030 // Set the format for date / time labels for current stream.
2031 
2032 PLDLLIMPEXP void
2033 c_pltimefmt( PLCHAR_VECTOR fmt );
2034 
2035 // Sets the edges of the viewport with the given aspect ratio, leaving
2036 // room for labels.
2037 
2038 PLDLLIMPEXP void
2039 c_plvasp( PLFLT aspect );
2040 
2041 // Creates the largest viewport of the specified aspect ratio that fits
2042 // within the specified normalized subpage coordinates.
2043 
2044 // simple arrow plotter.
2045 
2046 PLDLLIMPEXP void
2047 c_plvect( PLFLT_MATRIX u, PLFLT_MATRIX v, PLINT nx, PLINT ny, PLFLT scale,
2048           PLTRANSFORM_callback pltr, PLPointer pltr_data );
2049 
2050 //
2051 // Routine to plot a vector array with arbitrary coordinate
2052 // and vector transformations
2053 //
2054 PLDLLIMPEXP void
2055 plfvect( PLF2EVAL_callback getuv, PLPointer up, PLPointer vp,
2056          PLINT nx, PLINT ny, PLFLT scale,
2057          PLTRANSFORM_callback pltr, PLPointer pltr_data );
2058 
2059 PLDLLIMPEXP void
2060 c_plvpas( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect );
2061 
2062 // Creates a viewport with the specified normalized subpage coordinates.
2063 
2064 PLDLLIMPEXP void
2065 c_plvpor( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax );
2066 
2067 // Defines a "standard" viewport with seven character heights for
2068 // the left margin and four character heights everywhere else.
2069 
2070 PLDLLIMPEXP void
2071 c_plvsta( void );
2072 
2073 // Set up a window for three-dimensional plotting.
2074 
2075 PLDLLIMPEXP void
2076 c_plw3d( PLFLT basex, PLFLT basey, PLFLT height, PLFLT xmin,
2077          PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin,
2078          PLFLT zmax, PLFLT alt, PLFLT az );
2079 
2080 // Set pen width.
2081 
2082 PLDLLIMPEXP void
2083 c_plwidth( PLFLT width );
2084 
2085 // Set up world coordinates of the viewport boundaries (2d plots).
2086 
2087 PLDLLIMPEXP void
2088 c_plwind( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax );
2089 
2090 // Set xor mode; mode = 1-enter, 0-leave, status = 0 if not interactive device
2091 
2092 PLDLLIMPEXP void
2093 c_plxormod( PLBOOL mode, PLBOOL_NC_SCALAR status );
2094 
2095 
2096 //--------------------------------------------------------------------------
2097 //		Functions for use from C or C++ only
2098 //--------------------------------------------------------------------------
2099 
2100 // Returns a list of file-oriented device names and their menu strings
2101 
2102 PLDLLIMPEXP void
2103 plgFileDevs( PLCHAR_VECTOR **p_menustr, PLCHAR_VECTOR **p_devname, int *p_ndev );
2104 
2105 // Returns a list of all device names and their menu strings
2106 
2107 PLDLLIMPEXP void
2108 plgDevs( PLCHAR_VECTOR **p_menustr, PLCHAR_VECTOR **p_devname, int *p_ndev );
2109 
2110 // Set the function pointer for the keyboard event handler
2111 
2112 PLDLLIMPEXP void
2113 plsKeyEH( void ( *KeyEH )( PLGraphicsIn *, PLPointer, int * ), PLPointer KeyEH_data );
2114 
2115 // Set the function pointer for the (mouse) button event handler
2116 
2117 PLDLLIMPEXP void
2118 plsButtonEH( void ( *ButtonEH )( PLGraphicsIn *, PLPointer, int * ),
2119              PLPointer ButtonEH_data );
2120 
2121 // Sets an optional user bop handler
2122 
2123 PLDLLIMPEXP void
2124 plsbopH( void ( *handler )( PLPointer, int * ), PLPointer handler_data );
2125 
2126 // Sets an optional user eop handler
2127 
2128 PLDLLIMPEXP void
2129 plseopH( void ( *handler )( PLPointer, int * ), PLPointer handler_data );
2130 
2131 // Set the variables to be used for storing error info
2132 
2133 PLDLLIMPEXP void
2134 plsError( PLINT_NC_SCALAR errcode, PLCHAR_NC_VECTOR errmsg );
2135 
2136 // Sets an optional user exit handler.
2137 
2138 PLDLLIMPEXP void
2139 plsexit( int ( *handler )( PLCHAR_VECTOR ) );
2140 
2141 // Sets an optional user abort handler.
2142 
2143 PLDLLIMPEXP void
2144 plsabort( void ( *handler )( PLCHAR_VECTOR ) );
2145 
2146 // Transformation routines
2147 
2148 // Identity transformation.
2149 
2150 PLDLLIMPEXP void
2151 pltr0( PLFLT x, PLFLT y, PLFLT_NC_SCALAR tx, PLFLT_NC_SCALAR ty, PLPointer pltr_data );
2152 
2153 // Does linear interpolation from singly dimensioned coord arrays.
2154 
2155 PLDLLIMPEXP void
2156 pltr1( PLFLT x, PLFLT y, PLFLT_NC_SCALAR tx, PLFLT_NC_SCALAR ty, PLPointer pltr_data );
2157 
2158 // Does linear interpolation from doubly dimensioned coord arrays
2159 // (column dominant, as per normal C 2d arrays).
2160 
2161 PLDLLIMPEXP void
2162 pltr2( PLFLT x, PLFLT y, PLFLT_NC_SCALAR tx, PLFLT_NC_SCALAR ty, PLPointer pltr_data );
2163 
2164 // Just like pltr2() but uses pointer arithmetic to get coordinates from
2165 // 2d grid tables.
2166 
2167 PLDLLIMPEXP void
2168 pltr2p( PLFLT x, PLFLT y, PLFLT_NC_SCALAR tx, PLFLT_NC_SCALAR ty, PLPointer pltr_data );
2169 
2170 // Does linear interpolation from doubly dimensioned coord arrays
2171 // (row dominant, i.e. Fortran ordering).
2172 
2173 PLDLLIMPEXP void
2174 pltr2f( PLFLT x, PLFLT y, PLFLT_NC_SCALAR tx, PLFLT_NC_SCALAR ty, PLPointer pltr_data );
2175 
2176 //
2177 // Returns a pointer to a plf2ops_t stucture with pointers to functions for
2178 // accessing 2-D data referenced as (PLFLT **), such as the C variable z
2179 // declared as...
2180 //
2181 //   PLFLT z[nx][ny];
2182 //
2183 
2184 PLDLLIMPEXP PLF2OPS
2185 plf2ops_c( void );
2186 
2187 //
2188 // Returns a pointer to a plf2ops_t stucture with pointers to functions for accessing 2-D data
2189 // referenced as (PLfGrid2 *), where the PLfGrid2's "f" is treated as type
2190 // (PLFLT **).
2191 //
2192 
2193 PLDLLIMPEXP PLF2OPS
2194 plf2ops_grid_c( void );
2195 
2196 //
2197 // Returns a pointer to a plf2ops_t stucture with pointers to functions for
2198 // accessing 2-D data stored in (PLfGrid2 *), with the PLfGrid2's "f" field
2199 // treated as type (PLFLT *) pointing to 2-D data stored in row-major order.
2200 // In the context of plotting, it might be easier to think of it as "X-major"
2201 // order.  In this ordering, values for a single X index are stored in
2202 // consecutive memory locations.
2203 //
2204 
2205 PLDLLIMPEXP PLF2OPS
2206 plf2ops_grid_row_major( void );
2207 
2208 //
2209 // Returns a pointer to a plf2ops_t stucture with pointers to functions for
2210 // accessing 2-D data stored in (PLfGrid2 *), with the PLfGrid2's "f" field
2211 // treated as type (PLFLT *) pointing to 2-D data stored in column-major order.
2212 // In the context of plotting, it might be easier to think of it as "Y-major"
2213 // order.  In this ordering, values for a single Y index are stored in
2214 // consecutive memory locations.
2215 //
2216 
2217 PLDLLIMPEXP PLF2OPS
2218 plf2ops_grid_col_major( void );
2219 
2220 
2221 // Function evaluators (Should these be deprecated in favor of plf2ops?)
2222 
2223 //
2224 // Does a lookup from a 2d function array.  plf2eval_data is treated as type
2225 // (PLFLT **) and data for (ix,iy) is returned from...
2226 //
2227 // plf2eval_data[ix][iy];
2228 //
2229 
2230 PLDLLIMPEXP PLFLT
2231 plf2eval1( PLINT ix, PLINT iy, PLPointer plf2eval_data );
2232 
2233 //
2234 // Does a lookup from a 2d function array.  plf2eval_data is treated as type
2235 // (PLfGrid2 *) and data for (ix,iy) is returned from...
2236 //
2237 // plf2eval_data->f[ix][iy];
2238 //
2239 
2240 PLDLLIMPEXP PLFLT
2241 plf2eval2( PLINT ix, PLINT iy, PLPointer plf2eval_data );
2242 
2243 //
2244 // Does a lookup from a 2d function array.  plf2eval_data is treated as type
2245 // (PLfGrid *) and data for (ix,iy) is returned from...
2246 //
2247 // plf2eval_data->f[ix * plf2eval_data->ny + iy];
2248 //
2249 // This is commonly called "row-major order", but in the context of plotting,
2250 // it might be easier to think of it as "X-major order".  In this ordering,
2251 // values for a single X index are stored in consecutive memory locations.
2252 // This is also known as C ordering.
2253 //
2254 
2255 PLDLLIMPEXP PLFLT
2256 plf2eval( PLINT ix, PLINT iy, PLPointer plf2eval_data );
2257 
2258 //
2259 // Does a lookup from a 2d function array.  plf2eval_data is treated as type
2260 // (PLfGrid *) and data for (ix,iy) is returned from...
2261 //
2262 // plf2eval_data->f[ix + iy * plf2eval_data->nx];
2263 //
2264 // This is commonly called "column-major order", but in the context of
2265 // plotting, it might be easier to think of it as "Y-major order".  In this
2266 // ordering, values for a single Y index are stored in consecutive memory
2267 // locations.  This is also known as FORTRAN ordering.
2268 //
2269 
2270 PLDLLIMPEXP PLFLT
2271 plf2evalr( PLINT ix, PLINT iy, PLPointer plf2eval_data );
2272 
2273 // Command line parsing utilities
2274 
2275 // Clear internal option table info structure.
2276 
2277 PLDLLIMPEXP void
2278 plClearOpts( void );
2279 
2280 // Reset internal option table info structure.
2281 
2282 PLDLLIMPEXP void
2283 plResetOpts( void );
2284 
2285 // Merge user option table into internal info structure.
2286 
2287 PLDLLIMPEXP PLINT
2288 plMergeOpts( PLOptionTable *options, PLCHAR_VECTOR name, PLCHAR_VECTOR *notes );
2289 
2290 // Set the strings used in usage and syntax messages.
2291 
2292 PLDLLIMPEXP void
2293 plSetUsage( PLCHAR_VECTOR program_string, PLCHAR_VECTOR usage_string );
2294 
2295 // Process input strings, treating them as an option and argument pair.
2296 // The first is for the external API, the second the work routine declared
2297 // here for backward compatibilty.
2298 
2299 PLDLLIMPEXP PLINT
2300 c_plsetopt( PLCHAR_VECTOR opt, PLCHAR_VECTOR optarg );
2301 
2302 // Process options list using current options info.
2303 
2304 PLDLLIMPEXP PLINT
2305 c_plparseopts( int *p_argc, PLCHAR_NC_MATRIX argv, PLINT mode );
2306 
2307 // Print usage & syntax message.
2308 
2309 PLDLLIMPEXP void
2310 plOptUsage( void );
2311 
2312 // Miscellaneous
2313 
2314 // Set the output file pointer
2315 
2316 PLDLLIMPEXP void
2317 plgfile( FILE **p_file );
2318 
2319 // Get the output file pointer
2320 
2321 PLDLLIMPEXP void
2322 plsfile( FILE *file );
2323 
2324 // Get the escape character for text strings.
2325 
2326 PLDLLIMPEXP void
2327 plgesc( PLCHAR_NC_SCALAR p_esc );
2328 
2329 // Front-end to driver escape function.
2330 
2331 PLDLLIMPEXP void
2332 pl_cmd( PLINT op, PLPointer ptr );
2333 
2334 // Return full pathname for given file if executable
2335 
2336 PLDLLIMPEXP PLINT
2337 plFindName( PLCHAR_NC_VECTOR p );
2338 
2339 // Looks for the specified executable file according to usual search path.
2340 
2341 PLDLLIMPEXP PLCHAR_NC_VECTOR
2342 plFindCommand( PLCHAR_VECTOR fn );
2343 
2344 // Gets search name for file by concatenating the dir, subdir, and file
2345 // name, allocating memory as needed.
2346 
2347 PLDLLIMPEXP void
2348 plGetName( PLCHAR_VECTOR dir, PLCHAR_VECTOR subdir, PLCHAR_VECTOR filename, PLCHAR_NC_VECTOR *filespec );
2349 
2350 // Prompts human to input an integer in response to given message.
2351 
2352 PLDLLIMPEXP PLINT
2353 plGetInt( PLCHAR_VECTOR s );
2354 
2355 // Prompts human to input a float in response to given message.
2356 
2357 PLDLLIMPEXP PLFLT
2358 plGetFlt( PLCHAR_VECTOR s );
2359 
2360 // C, C++ only.  Determine the Iliffe column vector of pointers to PLFLT row
2361 // vectors corresponding to a 2D matrix of PLFLT's that is statically
2362 // allocated.
2363 
2364 PLDLLIMPEXP void
2365 plStatic2dGrid( PLFLT_NC_MATRIX zIliffe, PLFLT_VECTOR zStatic, PLINT nx, PLINT ny );
2366 
2367 // C, C++ only.  Allocate a block of memory for use as a 2-d grid of PLFLT's organized
2368 // as an Iliffe column vector of pointers to PLFLT row vectors.
2369 
2370 PLDLLIMPEXP void
2371 plAlloc2dGrid( PLFLT_NC_MATRIX *f, PLINT nx, PLINT ny );
2372 
2373 // Frees a block of memory allocated with plAlloc2dGrid().
2374 
2375 PLDLLIMPEXP void
2376 plFree2dGrid( PLFLT_NC_MATRIX f, PLINT nx, PLINT ny );
2377 
2378 // Find the maximum and minimum of a 2d matrix allocated with plAllc2dGrid().
2379 
2380 PLDLLIMPEXP void
2381 plMinMax2dGrid( PLFLT_MATRIX f, PLINT nx, PLINT ny, PLFLT_NC_SCALAR fmax, PLFLT_NC_SCALAR fmin );
2382 
2383 // Wait for graphics input event and translate to world coordinates
2384 
2385 PLDLLIMPEXP PLINT
2386 plGetCursor( PLGraphicsIn *gin );
2387 
2388 // Translates relative device coordinates to world coordinates.
2389 
2390 PLDLLIMPEXP PLINT
2391 plTranslateCursor( PLGraphicsIn *gin );
2392 
2393 // Set the pointer to the data used in driver initialisation
2394 
2395 // N.B. Currently used only by the wxwidgets device driver and
2396 // associated binding.  This function might be used for other device drivers
2397 // later on whether written in c++ or c.  But this function is not part of the
2398 // common API and should not be propagated to any binding other than
2399 // c++.
2400 
2401 PLDLLIMPEXP void
2402 plsdevdata( PLPointer data );
2403 
2404 #ifdef __cplusplus
2405 }
2406 #endif
2407 #if 0
2408 #if defined ( __GNUC__ ) && __GNUC__ > 3
2409   #pragma GCC visibility pop
2410 #endif
2411 #endif
2412 
2413 #endif  // __PLPLOT_H__
2414