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