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