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