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