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