PLplot
5.11.0
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
plstream.h
Go to the documentation of this file.
1
//----------------------------------*-C++-*----------------------------------//
2
// Geoffrey Furnish
3
// Sep 21 1994
4
//
5
// Copyright (C) 2004,2005 Andrew Ross
6
// Copyright (C) 2004-2014 Alan W. Irwin
7
//
8
// This file is part of PLplot.
9
//
10
// PLplot is free software; you can redistribute it and/or modify
11
// it under the terms of the GNU Library General Public License as published
12
// by the Free Software Foundation; either version 2 of the License, or
13
// (at your option) any later version.
14
//
15
// PLplot is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Library General Public License for more details.
19
//
20
// You should have received a copy of the GNU Library General Public License
21
// along with PLplot; if not, write to the Free Software
22
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
24
//--------------------------------------------------------------------------
25
// @> Header file plstream.
26
//--------------------------------------------------------------------------
27
28
#ifndef __plstream_h__
29
#define __plstream_h__
30
31
#include "
plplot.h
"
32
33
class
PLS
{
34
public
:
35
enum
stream_id
{
Next
,
Current
,
Specific
};
36
};
37
38
enum
PLcolor
{
Black
= 0,
Red
,
Yellow
,
Green
,
39
Cyan
,
Pink
,
Tan
,
Grey
,
40
DarkRed
,
DeepBlue
,
Purple
,
LightCyan
,
41
LightBlue
,
Orchid
,
Mauve
,
White
};
42
43
// A class for assisting in generalizing the data prescription
44
// interface to the contouring routines.
45
46
class
Contourable_Data
{
47
int
_nx
,
_ny
;
48
public
:
49
Contourable_Data
(
int
nx,
int
ny ) :
_nx
( nx ),
_ny
( ny ) {}
50
virtual
void
elements
(
int
& nx,
int
& ny )
const
{ nx =
_nx
; ny =
_ny
; }
51
virtual
PLFLT
operator()
(
int
i,
int
j )
const
= 0;
52
virtual
~Contourable_Data
() {};
53
};
54
55
PLFLT
Contourable_Data_evaluator
(
PLINT
i,
PLINT
j,
PLPointer
p );
56
57
class
PLDLLIMPEXP_CXX
Coord_Xformer
{
58
public
:
59
virtual
void
xform
(
PLFLT
ox,
PLFLT
oy,
PLFLT
& nx,
PLFLT
& ny )
const
= 0;
60
virtual
~Coord_Xformer
() {};
61
};
62
63
void
Coord_Xform_evaluator
(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
);
64
65
class
Coord_2d
{
66
public
:
67
virtual
PLFLT
operator()
(
int
ix,
int
iy )
const
= 0;
68
virtual
void
elements
(
int
& _nx,
int
& _ny ) = 0;
69
virtual
void
min_max
(
PLFLT
& _min,
PLFLT
& _max ) = 0;
70
virtual
~Coord_2d
() {};
71
};
72
73
class
PLDLLIMPEXP_CXX
cxx_pltr2
:
public
Coord_Xformer
{
74
Coord_2d
&
xg
;
75
Coord_2d
&
yg
;
76
public
:
77
cxx_pltr2
(
Coord_2d
& cx,
Coord_2d
& cy );
78
void
xform
(
PLFLT
x,
PLFLT
y,
PLFLT
& tx,
PLFLT
& ty )
const
;
79
};
80
81
//--------------------------------------------------------------------------
82
//Callback functions for passing into various API methods. We provide these
83
//wrappers to avoid a requirement for linking to the C shared library.
84
//--------------------------------------------------------------------------
85
86
namespace
plcallback
87
{
88
// Callback for plfill. This will just call the C plfill function
89
90
PLDLLIMPEXP_CXX
void
fill
(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y );
91
92
// Identity transformation.
93
94
PLDLLIMPEXP_CXX
void
tr0
(
PLFLT
x,
PLFLT
y,
PLFLT
*tx,
PLFLT
*ty,
PLPointer
pltr_data );
95
96
// Does linear interpolation from singly dimensioned coord arrays.
97
98
PLDLLIMPEXP_CXX
void
tr1
(
PLFLT
x,
PLFLT
y,
PLFLT
*tx,
PLFLT
*ty,
PLPointer
pltr_data );
99
100
// Does linear interpolation from doubly dimensioned coord arrays
101
// (column dominant, as per normal C 2d arrays).
102
103
PLDLLIMPEXP_CXX
void
tr2
(
PLFLT
x,
PLFLT
y,
PLFLT
*tx,
PLFLT
*ty,
PLPointer
pltr_data );
104
105
// Just like pltr2() but uses pointer arithmetic to get coordinates from
106
// 2d grid tables.
107
108
PLDLLIMPEXP_CXX
void
tr2p
(
PLFLT
x,
PLFLT
y,
PLFLT
*tx,
PLFLT
*ty,
PLPointer
pltr_data );
109
}
110
111
//--------------------------------------------------------------------------
112
// class plstream - C++ class for encapsulating PLplot streams
113
114
// Cool stuff.
115
//--------------------------------------------------------------------------
116
117
class
PLDLLIMPEXP_CXX
plstream
{
118
PLINT
stream
;
119
120
static
PLINT
active_streams
;
121
122
private
:
123
// These have to be disabled till we implement reference counting.
124
125
plstream
(
const
plstream
& );
126
plstream
& operator=(
const
plstream
& );
127
128
protected
:
129
virtual
void
set_stream
(
void
) {
::c_plsstrm
( stream ); }
130
131
public
:
132
plstream
(
void
);
133
plstream
(
plstream
* pls );
134
plstream
(
PLS::stream_id
sid
,
PLINT
strm = 0 );
135
plstream
(
PLINT
_stream ) : stream( _stream ) {}
136
plstream
(
PLINT
nx
/*=1*/
,
PLINT
ny
/*=1*/
,
137
const
char
*driver = NULL,
const
char
*file = NULL );
138
plstream
(
PLINT
nx
/*=1*/
,
PLINT
ny
/*=1*/
,
PLINT
r,
PLINT
g,
PLINT
b,
139
const
char
*driver = NULL,
const
char
*file = NULL );
140
141
virtual
~
plstream
(
void
);
142
143
// Now start miroring the PLplot C API.
144
145
// C routines callable from stub routines come first
146
147
// Advance to subpage "page", or to the next one if "page" = 0.
148
149
void
adv(
PLINT
page );
150
151
// Plot an arc
152
153
void
arc
(
PLFLT
x,
PLFLT
y,
PLFLT
a,
PLFLT
b,
PLFLT
angle1,
PLFLT
angle2,
154
PLFLT
rotate,
PLBOOL
fill
);
155
156
// Simple arrow plotter
157
#ifdef PL_DEPRECATED
158
void
arrows(
const
PLFLT
*u,
const
PLFLT
*v,
const
PLFLT
*x,
const
PLFLT
*y,
PLINT
n,
159
PLFLT
scale,
PLFLT
dx
,
PLFLT
dy
);
160
#endif // PL_DEPRECATED
161
162
void
vect(
const
PLFLT
*
const
*u,
const
PLFLT
*
const
*v,
PLINT
nx,
PLINT
ny,
PLFLT
scale,
163
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
164
PLPointer
pltr_data );
165
166
// Set the arrow style
167
void
svect(
const
PLFLT
*arrow_x = NULL,
const
PLFLT
*arrow_y = NULL,
PLINT
npts = 0,
bool
fill
=
false
);
168
169
// This functions similarly to plbox() except that the origin of the axes is
170
// placed at the user-specified point (x0, y0).
171
172
void
axes(
PLFLT
x0,
PLFLT
y0,
const
char
*xopt,
PLFLT
xtick,
PLINT
nxsub,
173
const
char
*yopt,
PLFLT
ytick,
PLINT
nysub );
174
175
// Plot a histogram using x to store data values and y to store frequencies.
176
177
void
bin(
PLINT
nbin,
const
PLFLT
*x,
const
PLFLT
*y,
PLINT
center );
178
179
// Start new page. Should only be used with pleop().
180
181
void
bop(
void
);
182
183
// This draws a box around the current viewport.
184
185
void
box(
const
char
*xopt,
PLFLT
xtick,
PLINT
nxsub,
186
const
char
*yopt,
PLFLT
ytick,
PLINT
nysub );
187
188
// This is the 3-d analogue of plbox().
189
190
void
box3(
const
char
*xopt,
const
char
*xlabel,
PLFLT
xtick,
PLINT
nsubx,
191
const
char
*yopt,
const
char
*ylabel,
PLFLT
ytick,
PLINT
nsuby,
192
const
char
*zopt,
const
char
*zlabel,
PLFLT
ztick,
PLINT
nsubz );
193
194
// Calculate broken-down time from continuous time for current stream.
195
196
void
btime(
PLINT
&year,
PLINT
&month,
PLINT
&day,
PLINT
&hour,
197
PLINT
&
min
,
PLFLT
&sec,
PLFLT
ctime );
198
199
// Calculate world coordinates and subpage from relative device coordinates.
200
201
void
calc_world(
PLFLT
rx
,
PLFLT
ry
,
PLFLT
& wx,
PLFLT
& wy,
PLINT
& window );
202
203
// Clear the current subpage.
204
205
void
clear(
void
);
206
207
// Set color, map 0. Argument is integer between 0 and 15.
208
209
void
col0(
PLINT
icol0 );
210
211
// Set the color using a descriptive name. Replaces plcol0(). (Except that
212
// col0 won't die.)
213
214
void
col(
PLcolor
c );
215
216
// Set color, map 1. Argument is a float between 0. and 1.
217
218
void
col1(
PLFLT
c );
219
220
// Previous function was inadvertently named plcol in old versions of
221
// plplot - this is maintained for backwards compatibility, but is best
222
// avoided in new code.
223
void
col(
PLFLT
c );
224
225
// Configure transformation between continuous and broken-down time (and
226
// vice versa) for current stream.
227
void
configtime(
PLFLT
scale,
PLFLT
offset1,
PLFLT
offset2,
228
PLINT
ccontrol,
PLBOOL
ifbtime_offset,
PLINT
year,
229
PLINT
month,
PLINT
day,
PLINT
hour,
PLINT
min
,
PLFLT
sec );
230
231
// Draws a contour plot from data in f(nx,ny). Is just a front-end to
232
// plfcont, with a particular choice for f2eval and f2eval_data.
233
234
void
cont(
const
PLFLT
*
const
*f,
PLINT
nx,
PLINT
ny,
PLINT
kx,
PLINT
lx,
235
PLINT
ky,
PLINT
ly,
const
PLFLT
* clevel,
PLINT
nlevel,
236
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
237
PLPointer
pltr_data );
238
239
// Draws a contour plot using the function evaluator f2eval and data stored
240
// by way of the f2eval_data pointer. This allows arbitrary organizations
241
// of 2d array data to be used.
242
243
void
fcont(
PLFLT
( *f2eval )(
PLINT
,
PLINT
,
PLPointer
),
244
PLPointer
f2eval_data,
245
PLINT
nx,
PLINT
ny,
PLINT
kx,
PLINT
lx,
246
PLINT
ky,
PLINT
ly,
const
PLFLT
* clevel,
PLINT
nlevel,
247
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
248
PLPointer
pltr_data );
249
250
// Copies state parameters from the reference stream to the current stream.
251
252
void
cpstrm(
plstream
&pls,
bool
flags );
253
254
// Calculate continuous time from broken-down time for current stream.
255
void
ctime(
PLINT
year,
PLINT
month,
PLINT
day,
PLINT
hour,
PLINT
min
,
256
PLFLT
sec,
PLFLT
&ctime );
257
258
// Converts input values from relative device coordinates to relative plot
259
// coordinates.
260
261
void
did2pc(
PLFLT
&
xmin
,
PLFLT
&
ymin
,
PLFLT
&
xmax
,
PLFLT
&
ymax
);
262
263
// Converts input values from relative plot coordinates to relative device
264
// coordinates.
265
266
void
dip2dc(
PLFLT
&
xmin
,
PLFLT
&
ymin
,
PLFLT
&
xmax
,
PLFLT
&
ymax
);
267
268
// These shouldn't be needed, are supposed to be handled by ctor/dtor
269
// semantics of the plstream object.
270
271
// End a plotting session for all open streams.
272
273
// void end();
274
275
// End a plotting session for the current stream only.
276
277
// void end1();
278
279
// Simple interface for defining viewport and window.
280
281
void
env(
PLFLT
xmin
,
PLFLT
xmax
,
PLFLT
ymin
,
PLFLT
ymax
,
282
PLINT
just,
PLINT
axis );
283
284
// similar to env() above, but in multiplot mode does not advance
285
// the subpage, instead the current subpage is cleared
286
287
void
env0(
PLFLT
xmin
,
PLFLT
xmax
,
PLFLT
ymin
,
PLFLT
ymax
,
288
PLINT
just,
PLINT
axis );
289
290
// End current page. Should only be used with plbop().
291
292
void
eop(
void
);
293
294
// Plot horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i)).
295
296
void
errx(
PLINT
n,
const
PLFLT
*
xmin
,
const
PLFLT
*
xmax
,
const
PLFLT
*y );
297
298
// Plot vertical error bars (x,ymin(i)) to (x(i),ymax(i)).
299
300
void
erry(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*
ymin
,
const
PLFLT
*
ymax
);
301
302
// Advance to the next family file on the next new page.
303
304
void
famadv(
void
);
305
306
// Pattern fills the polygon bounded by the input points.
307
308
void
fill
(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y );
309
310
// Pattern fills the 3d polygon bounded by the input points.
311
312
void
fill3(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*z );
313
314
// Flushes the output stream. Use sparingly, if at all.
315
316
void
flush(
void
);
317
318
// Sets the global font flag to 'ifont'.
319
320
void
font(
PLINT
ifont );
321
322
// Load specified font set.
323
324
void
fontld(
PLINT
fnt );
325
326
// Get character default height and current (scaled) height.
327
328
void
gchr(
PLFLT
& p_def,
PLFLT
& p_ht );
329
330
// Returns 8 bit RGB values for given color from color map 0.
331
332
void
gcol0(
PLINT
icol0,
PLINT
& r,
PLINT
& g,
PLINT
& b );
333
334
// Returns 8 bit RGB and 0.0-1.0 alpha values for given color from color map 0.
335
336
void
gcol0a(
PLINT
icol0,
PLINT
& r,
PLINT
& g,
PLINT
& b,
PLFLT
& a );
337
338
// Returns the background color by 8 bit RGB value.
339
340
void
gcolbg(
PLINT
& r,
PLINT
& g,
PLINT
& b );
341
342
// Returns the background color by 8 bit RGB and 0.0-1.0 alpha values.
343
344
void
gcolbga(
PLINT
& r,
PLINT
& g,
PLINT
& b,
PLFLT
& a );
345
346
// Returns the current compression setting
347
348
void
gcompression(
PLINT
& compression );
349
350
// Retrieve current window into device space.
351
352
void
gdidev(
PLFLT
& mar,
PLFLT
& aspect,
PLFLT
& jx,
PLFLT
& jy );
353
354
// Get plot orientation.
355
356
void
gdiori(
PLFLT
& rot );
357
358
// Retrieve current window into plot space.
359
360
void
gdiplt(
PLFLT
&
xmin
,
PLFLT
&
ymin
,
PLFLT
&
xmax
,
PLFLT
&
ymax
);
361
362
// Get FCI (font characterization integer)
363
364
void
gfci(
PLUNICODE
& pfci );
365
366
// Get family file parameters.
367
368
void
gfam(
PLINT
& fam,
PLINT
& num,
PLINT
& bmax );
369
370
// Get the (current) output file name. Must be preallocated to >80 bytes.
371
372
void
gfnam(
char
*fnam );
373
374
// Get the current font family, style and weight
375
376
void
gfont(
PLINT
& family,
PLINT
& style,
PLINT
& weight );
377
378
// Get the (current) run level.
379
380
void
glevel(
PLINT
&p_level );
381
382
// Get output device parameters.
383
384
void
gpage(
PLFLT
& xp,
PLFLT
& yp,
PLINT
& xleng,
PLINT
& yleng,
385
PLINT
& xoff,
PLINT
& yoff );
386
387
// Switches to graphics screen.
388
389
void
gra(
void
);
390
391
// Draw gradient in polygon.
392
393
void
gradient
(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
PLFLT
angle );
394
395
// grid irregularly sampled data
396
397
void
griddata(
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*z,
PLINT
npts,
398
const
PLFLT
*
xg
,
PLINT
nptsx,
const
PLFLT
*
yg
,
PLINT
nptsy,
399
PLFLT
**zg,
PLINT
type,
PLFLT
data );
400
401
// Get subpage boundaries in absolute coordinates.
402
403
void
gspa(
PLFLT
&
xmin
,
PLFLT
&
xmax
,
PLFLT
&
ymin
,
PLFLT
&
ymax
);
404
405
// This shouldn't be needed in this model.
406
407
// Get current stream number.
408
409
// void gstrm( PLINT *p_strm );
410
411
// Get the current library version number.
412
413
void
gver(
char
*p_ver );
414
415
// Get the viewport window in normalized device coordinates
416
417
void
gvpd(
PLFLT
&
xmin
,
PLFLT
&
xmax
,
PLFLT
&
ymin
,
PLFLT
&
ymax
);
418
419
// Get the viewport window in world coordinates
420
421
void
gvpw(
PLFLT
&
xmin
,
PLFLT
&
xmax
,
PLFLT
&
ymin
,
PLFLT
&
ymax
);
422
423
// Get x axis labeling parameters.
424
425
void
gxax(
PLINT
& digmax,
PLINT
& digits );
426
427
// Get y axis labeling parameters.
428
429
void
gyax(
PLINT
& digmax,
PLINT
& digits );
430
431
// Get z axis labeling parameters
432
433
void
gzax(
PLINT
& digmax,
PLINT
& digits );
434
435
// Draws a histogram of n values of a variable in array data[0..n-1]
436
437
void
hist(
PLINT
n,
const
PLFLT
*data,
PLFLT
datmin,
PLFLT
datmax,
438
PLINT
nbin,
PLINT
oldwin );
439
440
// Set current color (map 0) by hue, lightness, and saturation.
441
442
#ifdef PL_DEPRECATED
443
void
hls(
PLFLT
h,
PLFLT
l,
PLFLT
s );
444
#endif // PL_DEPRECATED
445
446
// Initializes PLplot, using preset or default options
447
448
void
init(
void
);
449
450
// Draws a line segment from (x1, y1) to (x2, y2).
451
452
void
join(
PLFLT
x1,
PLFLT
y1,
PLFLT
x2,
PLFLT
y2 );
453
454
// Simple routine for labelling graphs.
455
456
void
lab(
const
char
*xlabel,
const
char
*ylabel,
const
char
*tlabel );
457
458
// Routine for drawing line, symbol, or cmap0 legends
459
void
legend(
PLFLT
*p_legend_width,
PLFLT
*p_legend_height,
460
PLINT
opt,
PLINT
position,
PLFLT
x,
PLFLT
y,
PLFLT
plot_width,
461
PLINT
bg_color,
PLINT
bb_color,
PLINT
bb_style,
462
PLINT
nrow,
PLINT
ncolumn,
463
PLINT
nlegend,
const
PLINT
*opt_array,
464
PLFLT
text_offset,
PLFLT
text_scale,
PLFLT
text_spacing,
465
PLFLT
text_justification,
466
const
PLINT
*text_colors,
const
char
*
const
*
text
,
467
const
PLINT
*box_colors,
const
PLINT
*box_patterns,
468
const
PLFLT
*box_scales,
const
PLFLT
*box_line_widths,
469
const
PLINT
*line_colors,
const
PLINT
*line_styles,
470
const
PLFLT
*line_widths,
471
const
PLINT
*symbol_colors,
const
PLFLT
*symbol_scales,
472
const
PLINT
*symbol_numbers,
const
char
*
const
*symbols );
473
474
void
colorbar(
PLFLT
*p_colorbar_width,
PLFLT
*p_colorbar_height,
475
PLINT
opt,
PLINT
position,
PLFLT
x,
PLFLT
y,
476
PLFLT
x_length,
PLFLT
y_length,
477
PLINT
bg_color,
PLINT
bb_color,
PLINT
bb_style,
478
PLFLT
low_cap_color,
PLFLT
high_cap_color,
479
PLINT
cont_color,
PLFLT
cont_width,
480
PLINT
n_labels,
PLINT
*label_opts,
const
char
*
const
*label,
481
PLINT
n_axes,
const
char
*
const
*axis_opts,
482
PLFLT
*ticks,
PLINT
*sub_ticks,
483
PLINT
*n_values,
const
PLFLT
*
const
*values );
484
485
// Sets position of the light source
486
487
void
lightsource(
PLFLT
x,
PLFLT
y,
PLFLT
z );
488
489
// Draws line segments connecting a series of points.
490
491
void
line
(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y );
492
493
// Draws a line in 3 space.
494
495
void
line3(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*z );
496
497
// Set line style.
498
499
void
lsty(
PLINT
lin );
500
501
// Plot continental outline in world coordinates
502
503
void
map(
void
( *
mapform
)(
PLINT
,
PLFLT
*,
PLFLT
* ),
const
char
*
name
,
504
PLFLT
minx,
PLFLT
maxx,
PLFLT
miny,
PLFLT
maxy );
505
506
// Plot map lines
507
508
void
mapline(
void
( *
mapform
)(
PLINT
,
PLFLT
*,
PLFLT
* ),
const
char
*
name
,
509
PLFLT
minx,
PLFLT
maxx,
PLFLT
miny,
PLFLT
maxy,
510
const
PLINT
*plotentries,
PLINT
nplotentries );
511
512
// Plot map points
513
514
void
mapstring(
void
( *
mapform
)(
PLINT
,
PLFLT
*,
PLFLT
* ),
515
const
char
*
name
,
const
char
*
string
,
516
PLFLT
minx,
PLFLT
maxx,
PLFLT
miny,
PLFLT
maxy,
517
const
PLINT
*plotentries,
PLINT
nplotentries );
518
519
// Plot map text
520
521
void
maptex(
void
( *
mapform
)(
PLINT
,
PLFLT
*,
PLFLT
* ),
522
const
char
*
name
,
PLFLT
dx
,
PLFLT
dy
,
PLFLT
just,
const
char
*
text
,
523
PLFLT
minx,
PLFLT
maxx,
PLFLT
miny,
PLFLT
maxy,
524
PLINT
plotentry );
525
526
// Plot map fills
527
528
void
mapfill(
void
( *
mapform
)(
PLINT
,
PLFLT
*,
PLFLT
* ),
529
const
char
*
name
,
PLFLT
minx,
PLFLT
maxx,
PLFLT
miny,
530
PLFLT
maxy,
const
PLINT
*plotentries,
PLINT
nplotentries );
531
532
// Plot the latitudes and longitudes on the background.
533
534
void
meridians(
void
( *
mapform
)(
PLINT
,
PLFLT
*,
PLFLT
* ),
535
PLFLT
dlong,
PLFLT
dlat,
PLFLT
minlong,
PLFLT
maxlong,
536
PLFLT
minlat,
PLFLT
maxlat );
537
538
// Plots a mesh representation of the function z[x][y].
539
540
void
mesh(
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*
const
*z,
PLINT
nx,
PLINT
ny,
PLINT
opt );
541
542
// Plots a mesh representation of the function z[x][y] with contour.
543
544
void
meshc(
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*
const
*z,
PLINT
nx,
PLINT
ny,
PLINT
opt,
545
const
PLFLT
*clevel,
PLINT
nlevel );
546
547
// Creates a new stream and makes it the default.
548
549
// void
550
// mkstrm(PLINT *p_strm);
551
552
// Prints out "text" at specified position relative to viewport
553
554
void
mtex(
const
char
*side,
PLFLT
disp,
PLFLT
pos,
PLFLT
just,
555
const
char
*
text
);
556
557
// Prints out "text" at specified position relative to viewport (3D)
558
559
void
mtex3(
const
char
*side,
PLFLT
disp,
PLFLT
pos,
PLFLT
just,
560
const
char
*
text
);
561
562
// Plots a 3-d representation of the function z[x][y].
563
564
void
plot3d
(
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*
const
*z,
565
PLINT
nx,
PLINT
ny,
PLINT
opt,
bool
side );
566
567
// Plots a 3-d representation of the function z[x][y] with contour.
568
569
void
plot3dc
(
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*
const
*z,
570
PLINT
nx,
PLINT
ny,
PLINT
opt,
571
const
PLFLT
*clevel,
PLINT
nlevel );
572
573
// Plots a 3-d representation of the function z[x][y] with contour
574
// and y index limits.
575
576
void
plot3dcl
(
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*
const
*z,
577
PLINT
nx,
PLINT
ny,
PLINT
opt,
578
const
PLFLT
*clevel,
PLINT
nlevel,
579
PLINT
ixstart,
PLINT
ixn,
const
PLINT
*indexymin,
const
PLINT
*indexymax );
580
581
582
// Plots a 3-d shaded representation of the function z[x][y].
583
584
void
surf3d(
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*
const
*z,
585
PLINT
nx,
PLINT
ny,
PLINT
opt,
586
const
PLFLT
*clevel,
PLINT
nlevel );
587
588
// Plots a 3-d shaded representation of the function z[x][y] with y
589
// index limits
590
591
void
surf3dl(
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*
const
*z,
592
PLINT
nx,
PLINT
ny,
PLINT
opt,
593
const
PLFLT
*clevel,
PLINT
nlevel,
594
PLINT
ixstart,
PLINT
ixn,
const
PLINT
*indexymin,
const
PLINT
*indexymax );
595
596
597
// Process options list using current options info.
598
599
int
parseopts(
int
*p_argc,
const
char
**
argv
,
PLINT
mode );
600
601
// Set fill pattern directly.
602
603
void
pat(
PLINT
nlin,
const
PLINT
*inc,
const
PLINT
*del );
604
605
// Draw a line connecting two points, accounting for coordinate transforms
606
607
void
path(
PLINT
n,
PLFLT
x1,
PLFLT
y1,
PLFLT
x2,
PLFLT
y2 );
608
609
// Plots array y against x for n points using ASCII code "code".
610
611
void
poin(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
PLINT
code );
612
613
// Draws a series of points in 3 space.
614
615
void
poin3(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*z,
PLINT
code );
616
617
// Draws a polygon in 3 space.
618
619
void
poly3(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*z,
const
bool
*draw,
bool
ifcc );
620
621
// Set the floating point precision (in number of places) in numeric labels.
622
623
void
prec(
PLINT
setp,
PLINT
prec );
624
625
// Set fill pattern, using one of the predefined patterns.
626
627
void
psty(
PLINT
patt );
628
629
// Prints out "text" at world cooordinate (x,y).
630
631
void
ptex(
PLFLT
x,
PLFLT
y,
PLFLT
dx
,
PLFLT
dy
,
PLFLT
just,
632
const
char
*
text
);
633
634
// Prints out "text" at world cooordinate (x,y,z).
635
636
void
ptex3(
PLFLT
wx,
PLFLT
wy,
PLFLT
wz,
PLFLT
dx
,
PLFLT
dy
,
PLFLT
dz,
637
PLFLT
sx,
PLFLT
sy,
PLFLT
sz,
PLFLT
just,
const
char
*
text
);
638
639
// Replays contents of plot buffer to current device/file.
640
641
void
replot
(
void
);
642
643
// Set line color by red, green, blue from 0. to 1.
644
645
#ifdef PL_DEPRECATED
646
void
rgb(
PLFLT
r,
PLFLT
g,
PLFLT
b );
647
#endif // PL_DEPRECATED
648
649
// Set line color by 8 bit RGB values.
650
651
#ifdef PL_DEPRECATED
652
void
rgb(
PLINT
r,
PLINT
g,
PLINT
b );
653
#endif // PL_DEPRECATED
654
655
// Set character height.
656
657
void
schr(
PLFLT
def,
PLFLT
scale );
658
659
// Set number of colors in cmap 0
660
661
void
scmap0n(
PLINT
ncol0 );
662
663
// Set number of colors in cmap 1
664
665
void
scmap1n(
PLINT
ncol1 );
666
667
// Set the color map 1 range used in continuous plots
668
669
void
scmap1_range(
PLFLT
min_color,
PLFLT
max_color );
670
671
// Get the color map 1 range used in continuous plots
672
673
void
gcmap1_range(
PLFLT
&min_color,
PLFLT
&max_color );
674
675
// Set color map 0 colors by 8 bit RGB values
676
677
void
scmap0(
const
PLINT
*r,
const
PLINT
*g,
const
PLINT
*b,
PLINT
ncol0 );
678
679
// Set color map 0 colors by 8 bit RGB values and alpha value (0.0-1.0)
680
681
void
scmap0a(
const
PLINT
*r,
const
PLINT
*g,
const
PLINT
*b,
const
PLFLT
*a,
PLINT
ncol0 );
682
683
// Set color map 1 colors by 8 bit RGB values
684
685
void
scmap1(
const
PLINT
*r,
const
PLINT
*g,
const
PLINT
*b,
PLINT
ncol1 );
686
687
// Set color map 1 colors by 8 bit RGB values and alpha value (0.0-1.0)
688
689
void
scmap1a(
const
PLINT
*r,
const
PLINT
*g,
const
PLINT
*b,
const
PLFLT
*a,
PLINT
ncol1 );
690
691
// Set color map 1 colors using a piece-wise linear relationship between
692
// intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
693
694
void
scmap1l(
bool
itype,
PLINT
npts,
const
PLFLT
*intensity,
695
const
PLFLT
*coord1,
const
PLFLT
*coord2,
const
PLFLT
*coord3,
const
bool
*alt_hue_path = NULL );
696
697
// void scmap1l( bool itype, PLINT npts, PLFLT *intensity,
698
// PLFLT *coord1, PLFLT *coord2, PLFLT *coord3 );
699
700
// Set color map 1 colors using a piece-wise linear relationship between
701
// intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
702
// Include alpha value in range 0.0-1.0.
703
704
void
scmap1la(
bool
itype,
PLINT
npts,
const
PLFLT
*intensity,
705
const
PLFLT
*coord1,
const
PLFLT
*coord2,
const
PLFLT
*coord3,
const
PLFLT
*a,
706
const
bool
*alt_hue_path = NULL );
707
708
// Set a given color from color map 0 by 8 bit RGB value
709
710
void
scol0
(
PLINT
icol0,
PLINT
r,
PLINT
g,
PLINT
b );
711
712
// Set a given color from color map 0 by 8 bit RGB value and alpha value (0.0-1.0)
713
714
void
scol0a(
PLINT
icol0,
PLINT
r,
PLINT
g,
PLINT
b,
PLFLT
a );
715
716
// Set the background color by 8 bit RGB value
717
718
void
scolbg(
PLINT
r,
PLINT
g,
PLINT
b );
719
720
// Set the background color by 8 bit RGB + alpha value
721
722
void
scolbga(
PLINT
r,
PLINT
g,
PLINT
b,
PLFLT
a );
723
724
// Used to globally turn color output on/off
725
726
void
scolor(
PLINT
color );
727
728
// Set the compression level
729
730
void
scompression(
PLINT
compression );
731
732
// Set the device (keyword) name
733
734
void
sdev(
const
char
*devname );
735
736
// Get the device (keyword) name
737
738
void
gdev(
char
*devname );
739
740
// Set window into device space using margin, aspect ratio, and
741
// justification
742
743
void
sdidev(
PLFLT
mar,
PLFLT
aspect,
PLFLT
jx,
PLFLT
jy );
744
745
// Set up transformation from metafile coordinates.
746
747
void
sdimap(
PLINT
dimxmin,
PLINT
dimxmax,
748
PLINT
dimymin,
PLINT
dimymax,
749
PLFLT
dimxpmm,
PLFLT
dimypmm );
750
751
// Set plot orientation, specifying rotation in units of pi/2.
752
753
void
sdiori(
PLFLT
rot );
754
755
// Set window into plot space
756
757
void
sdiplt(
PLFLT
xmin
,
PLFLT
ymin
,
PLFLT
xmax
,
PLFLT
ymax
);
758
759
// Set window into plot space incrementally (zoom)
760
761
void
sdiplz(
PLFLT
xmin
,
PLFLT
ymin
,
PLFLT
xmax
,
PLFLT
ymax
);
762
763
// Set the escape character for text strings.
764
765
void
sesc(
char
esc );
766
767
// Set offset and spacing of contour labels
768
769
void
setcontlabelparam(
PLFLT
offset,
PLFLT
size,
PLFLT
spacing,
770
PLINT
active );
771
772
// Set the format of the contour labels
773
774
void
setcontlabelformat(
PLINT
lexp,
PLINT
sigdig );
775
776
// Set family file parameters
777
778
void
sfam(
PLINT
fam,
PLINT
num,
PLINT
bmax );
779
780
// Set FCI (font characterization integer)
781
782
void
sfci(
PLUNICODE
fci );
783
784
// Set the output file name.
785
786
void
sfnam(
const
char
*fnam );
787
788
// Set the pointer to the data used in driver initialisation
789
790
void
sdevdata(
void
*data );
791
792
// Set the current font family, style and weight
793
794
void
sfont(
PLINT
family,
PLINT
style,
PLINT
weight );
795
796
// Shade region.
797
798
void
shade(
const
PLFLT
*
const
*a,
PLINT
nx,
PLINT
ny,
799
PLINT
( *defined )(
PLFLT
,
PLFLT
),
800
PLFLT
left,
PLFLT
right,
PLFLT
bottom,
PLFLT
top,
801
PLFLT
shade_min,
PLFLT
shade_max,
802
PLINT
sh_cmap,
PLFLT
sh_color,
PLFLT
sh_width,
803
PLINT
min_color,
PLFLT
min_width,
804
PLINT
max_color,
PLFLT
max_width,
805
void
( *
fill
)(
PLINT
,
const
PLFLT
*,
const
PLFLT
* ),
bool
rectangular,
806
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
807
PLPointer
pltr_data );
808
809
void
shades(
const
PLFLT
*
const
*a,
PLINT
nx,
PLINT
ny,
810
PLINT
( *defined )(
PLFLT
,
PLFLT
),
811
PLFLT
xmin
,
PLFLT
xmax
,
PLFLT
ymin
,
PLFLT
ymax
,
812
const
PLFLT
* clevel,
PLINT
nlevel,
PLFLT
fill_width,
813
PLINT
cont_color,
PLFLT
cont_width,
814
void
( *
fill
)(
PLINT
,
const
PLFLT
*,
const
PLFLT
* ),
bool
rectangular,
815
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
816
PLPointer
pltr_data );
817
818
// Would be nice to fix this even more, say by stuffing xmin, xmax,
819
// ymin, ymax, rectangular, and pcxf all into the contourable data
820
// class. Have to think more on that. Or maybe the coordinate info.
821
822
void
shade(
Contourable_Data
& d,
PLFLT
xmin,
PLFLT
xmax,
823
PLFLT
ymin,
PLFLT
ymax,
PLFLT
shade_min,
PLFLT
shade_max,
824
PLINT
sh_cmap,
PLFLT
sh_color,
PLFLT
sh_width,
825
PLINT
min_color,
PLFLT
min_width,
826
PLINT
max_color,
PLFLT
max_width,
827
bool
rectangular,
828
Coord_Xformer
*pcxf );
829
830
void
shade1(
const
PLFLT
* a,
PLINT
nx,
PLINT
ny,
831
PLINT
( *defined )(
PLFLT
,
PLFLT
),
832
PLFLT
left,
PLFLT
right,
PLFLT
bottom,
PLFLT
top,
833
PLFLT
shade_min,
PLFLT
shade_max,
834
PLINT
sh_cmap,
PLFLT
sh_color,
PLFLT
sh_width,
835
PLINT
min_color,
PLFLT
min_width,
836
PLINT
max_color,
PLFLT
max_width,
837
void
( *
fill
)(
PLINT
,
const
PLFLT
*,
const
PLFLT
* ),
bool
rectangular,
838
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
839
PLPointer
pltr_data );
840
841
void
fshade(
PLFLT
( *f2eval )(
PLINT
,
PLINT
,
PLPointer
),
842
PLPointer
f2eval_data,
843
PLFLT
( *c2eval )(
PLINT
,
PLINT
,
PLPointer
),
844
PLPointer
c2eval_data,
845
PLINT
nx,
PLINT
ny,
846
PLFLT
left,
PLFLT
right,
PLFLT
bottom,
PLFLT
top,
847
PLFLT
shade_min,
PLFLT
shade_max,
848
PLINT
sh_cmap,
PLFLT
sh_color,
PLFLT
sh_width,
849
PLINT
min_color,
PLFLT
min_width,
850
PLINT
max_color,
PLFLT
max_width,
851
void
( *
fill
)(
PLINT
,
const
PLFLT
*,
const
PLFLT
* ),
bool
rectangular,
852
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
853
PLPointer
pltr_data );
854
855
// Setup a user-provided custom labeling function
856
857
void
slabelfunc(
void
( *
label_func
)(
PLINT
,
PLFLT
,
char
*,
PLINT
,
PLPointer
),
858
PLPointer
label_data );
859
860
// Set up lengths of major tick marks.
861
862
void
smaj(
PLFLT
def,
PLFLT
scale );
863
864
// Set the RGB memory area to be plotted (with the 'mem' or 'memcairo' drivers)
865
866
void
smem(
PLINT
maxx,
PLINT
maxy,
void
*plotmem );
867
868
// Set the RGBA memory area to be plotted (with the 'memcairo' driver)
869
870
void
smema(
PLINT
maxx,
PLINT
maxy,
void
*plotmem );
871
872
// Set up lengths of minor tick marks.
873
874
void
smin(
PLFLT
def,
PLFLT
scale );
875
876
// Set orientation. Must be done before calling plinit.
877
878
void
sori(
PLINT
ori );
879
880
// Set output device parameters. Usually ignored by the driver.
881
882
void
spage(
PLFLT
xp,
PLFLT
yp,
PLINT
xleng,
PLINT
yleng,
883
PLINT
xoff,
PLINT
yoff );
884
885
// Set the pause (on end-of-page) status
886
887
void
spause(
bool
pause );
888
889
// Set the colors for color table 0 from a cmap0 file
890
891
void
spal0(
const
char
*filename );
892
893
// Set the colors for color table 1 from a cmap1 file
894
895
void
spal1(
const
char
*filename,
bool
interpolate =
true
);
896
897
// Set stream number.
898
899
void
sstrm(
PLINT
strm );
900
901
// Set the number of subwindows in x and y
902
903
void
ssub(
PLINT
nx,
PLINT
ny );
904
905
// Set symbol height.
906
907
void
ssym(
PLFLT
def,
PLFLT
scale );
908
909
// Initialize PLplot, passing in the windows/page settings.
910
911
void
star(
PLINT
nx,
PLINT
ny );
912
913
// Initialize PLplot, passing the device name and windows/page settings.
914
915
void
start(
const
char
*devname,
PLINT
nx,
PLINT
ny );
916
917
// Set the coordinate transform
918
919
void
stransform(
void
( *coordinate_transform )(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
PLPointer
coordinate_transform_data );
920
921
// Prints out the same string repeatedly at the n points in world
922
// coordinates given by the x and y arrays. Supersedes plpoin and
923
// plsymbol for the case where text refers to a unicode glyph either
924
// directly as UTF-8 or indirectly via the standard text escape
925
// sequences allowed for PLplot input strings.
926
927
void
string(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
const
char
*
string
);
928
929
// Prints out the same string repeatedly at the n points in world
930
// coordinates given by the x, y, and z arrays. Supersedes plpoin3
931
// for the case where text refers to a unicode glyph either directly
932
// as UTF-8 or indirectly via the standard text escape sequences
933
// allowed for PLplot input strings.
934
935
void
string3(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*z,
const
char
*
string
);
936
937
// Create 1d stripchart
938
939
void
stripc
(
PLINT
*
id
,
const
char
*xspec,
const
char
*yspec,
940
PLFLT
xmin,
PLFLT
xmax,
PLFLT
xjump,
PLFLT
ymin,
PLFLT
ymax,
941
PLFLT
xlpos,
PLFLT
ylpos,
942
bool
y_ascl,
bool
acc,
943
PLINT
colbox,
PLINT
collab,
944
const
PLINT
colline[],
const
PLINT
styline[],
const
char
*legline[],
945
const
char
*labx,
const
char
*laby,
const
char
*labtop );
946
947
// Add a point to a stripchart.
948
949
void
stripa(
PLINT
id
,
PLINT
pen,
PLFLT
x,
PLFLT
y );
950
951
// Deletes and releases memory used by a stripchart.
952
953
void
stripd(
PLINT
id
);
954
955
// plots a 2d image (or a matrix too large for plshade() ) - colors
956
// automatically scaled
957
958
void
image(
const
PLFLT
*
const
*data,
PLINT
nx,
PLINT
ny,
PLFLT
xmin,
PLFLT
xmax,
959
PLFLT
ymin,
PLFLT
ymax,
PLFLT
zmin,
PLFLT
zmax,
960
PLFLT
Dxmin,
PLFLT
Dxmax,
PLFLT
Dymin,
PLFLT
Dymax );
961
962
// plots a 2d image (or a matrix too large for plshade() )
963
964
void
imagefr(
const
PLFLT
*
const
*data,
PLINT
nx,
PLINT
ny,
PLFLT
xmin,
PLFLT
xmax,
965
PLFLT
ymin,
PLFLT
ymax,
PLFLT
zmin,
PLFLT
zmax,
966
PLFLT
valuemin,
PLFLT
valuemax,
967
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
968
PLPointer
pltr_data );
969
970
// Set up a new line style
971
972
void
styl(
PLINT
nms,
const
PLINT
*mark,
const
PLINT
*space );
973
974
// Sets the edges of the viewport to the specified absolute coordinates
975
976
void
svpa(
PLFLT
xmin,
PLFLT
xmax,
PLFLT
ymin,
PLFLT
ymax );
977
978
// Set x axis labeling parameters
979
980
void
sxax(
PLINT
digmax,
PLINT
digits );
981
982
// Set inferior X window
983
984
void
sxwin(
PLINT
window_id );
985
986
// Set y axis labeling parameters
987
988
void
syax(
PLINT
digmax,
PLINT
digits );
989
990
// Plots array y against x for n points using Hershey symbol "code"
991
992
void
sym(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
PLINT
code );
993
994
// Set z axis labeling parameters
995
996
void
szax(
PLINT
digmax,
PLINT
digits );
997
998
// Switches to text screen.
999
1000
void
text
(
void
);
1001
1002
// Set the format for date / time labels
1003
1004
void
timefmt(
const
char
*fmt );
1005
1006
// Sets the edges of the viewport with the given aspect ratio, leaving
1007
// room for labels.
1008
1009
void
vasp(
PLFLT
aspect );
1010
1011
// Creates the largest viewport of the specified aspect ratio that fits
1012
// within the specified normalized subpage coordinates.
1013
1014
void
vpas(
PLFLT
xmin,
PLFLT
xmax,
PLFLT
ymin,
PLFLT
ymax,
PLFLT
aspect );
1015
1016
// Creates a viewport with the specified normalized subpage coordinates.
1017
1018
void
vpor(
PLFLT
xmin,
PLFLT
xmax,
PLFLT
ymin,
PLFLT
ymax );
1019
1020
// Defines a "standard" viewport with seven character heights for
1021
// the left margin and four character heights everywhere else.
1022
1023
void
vsta(
void
);
1024
1025
// Set up a window for three-dimensional plotting.
1026
1027
void
w3d(
PLFLT
basex,
PLFLT
basey,
PLFLT
height,
PLFLT
xmin0,
1028
PLFLT
xmax0,
PLFLT
ymin0,
PLFLT
ymax0,
PLFLT
zmin0,
1029
PLFLT
zmax0,
PLFLT
alt,
PLFLT
az );
1030
1031
// Set pen width.
1032
1033
void
width(
PLFLT
width );
1034
1035
// Set up world coordinates of the viewport boundaries (2d plots).
1036
1037
void
wind(
PLFLT
xmin,
PLFLT
xmax,
PLFLT
ymin,
PLFLT
ymax );
1038
1039
// Set xor mode; mode = 1-enter, 0-leave, status = 0 if not interactive device
1040
void
xormod(
bool
mode,
bool
*status );
1041
1042
// Random number generator based on Mersenne Twister.
1043
// Functions to set seed and obtain real random numbers in the range [0,1].
1044
1045
void
seed(
unsigned
int
s );
1046
1047
PLFLT
randd(
void
);
1048
1049
1050
// The rest for use from C only
1051
1052
// Returns a list of file-oriented device names and their menu strings
1053
1054
void
gFileDevs(
const
char
***p_menustr,
const
char
***p_devname,
1055
int
*p_ndev );
1056
1057
// Set the function pointer for the keyboard event handler
1058
1059
void
sKeyEH(
void
( *KeyEH )(
PLGraphicsIn
*,
void
*,
int
* ),
1060
void
*KeyEH_data );
1061
1062
// Sets an optional user bop handler
1063
1064
void
sbopH(
void
( *handler )(
void
*,
int
* ),
void
*handlier_data );
1065
1066
// Sets an optional user eop handler
1067
1068
void
seopH(
void
( *handler )(
void
*,
int
* ),
void
*handlier_data );
1069
1070
// Set the variables to be used for storing error info
1071
1072
void
sError(
PLINT
*errcode,
char
*
errmsg
);
1073
1074
// Sets an optional user exit handler.
1075
1076
void
sexit(
int
( *handler )(
const
char
* ) );
1077
1078
// Transformation routines
1079
1080
// Identity transformation.
1081
1082
//static void tr0( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data );
1083
1084
// Does linear interpolation from singly dimensioned coord arrays.
1085
1086
//static void tr1( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data );
1087
1088
// Does linear interpolation from doubly dimensioned coord arrays
1089
// (column dominant, as per normal C 2d arrays).
1090
1091
//static void tr2( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data );
1092
1093
// Just like pltr2() but uses pointer arithmetic to get coordinates from
1094
// 2d grid tables.
1095
1096
//static void tr2p( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data );
1097
1098
// We obviously won't be using this object from Fortran...
1099
1100
// Identity transformation for plots from Fortran.
1101
1102
// void tr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data );
1103
1104
// Does linear interpolation from doubly dimensioned coord arrays
1105
// (row dominant, i.e. Fortran ordering).
1106
1107
// void tr2f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data );
1108
1109
// Example linear transformation function for contour plotter.
1110
// This is not actually part of the core library any more
1111
//void xform( PLFLT x, PLFLT y, PLFLT * tx, PLFLT * ty );
1112
1113
// Function evaluators
1114
1115
// Does a lookup from a 2d function array. Array is of type (PLFLT **),
1116
// and is column dominant (normal C ordering).
1117
1118
PLFLT
f2eval2(
PLINT
ix,
PLINT
iy,
PLPointer
plf2eval_data );
1119
1120
// Does a lookup from a 2d function array. Array is of type (PLFLT *),
1121
// and is column dominant (normal C ordering).
1122
1123
PLFLT
f2eval(
PLINT
ix,
PLINT
iy,
PLPointer
plf2eval_data );
1124
1125
// Does a lookup from a 2d function array. Array is of type (PLFLT *),
1126
// and is row dominant (Fortran ordering).
1127
1128
PLFLT
f2evalr(
PLINT
ix,
PLINT
iy,
PLPointer
plf2eval_data );
1129
1130
// Command line parsing utilities
1131
1132
// Clear internal option table info structure.
1133
1134
void
ClearOpts(
void
);
1135
1136
// Reset internal option table info structure.
1137
1138
void
ResetOpts(
void
);
1139
1140
// Merge user option table into internal info structure.
1141
1142
int
MergeOpts(
PLOptionTable
*
options
,
const
char
*
name
,
const
char
**notes );
1143
1144
// Set the strings used in usage and syntax messages.
1145
1146
void
SetUsage(
char
*program_string,
char
*usage_string );
1147
1148
// Process input strings, treating them as an option and argument pair.
1149
1150
int
setopt(
const
char
*opt,
const
char
*optarg );
1151
1152
// This version is for backward compatibility only - don't use in new code
1153
1154
int
SetOpt(
const
char
*opt,
const
char
*optarg );
1155
1156
// Process options list using current options info.
1157
1158
int
ParseOpts(
int
*p_argc,
const
char
**
argv
,
PLINT
mode );
1159
1160
// Print usage & syntax message.
1161
1162
void
OptUsage(
void
);
1163
1164
// Miscellaneous
1165
1166
// Set the output file pointer
1167
1168
void
gfile( FILE **p_file );
1169
1170
// Get the output file pointer
1171
1172
void
sfile( FILE *file );
1173
1174
// Get the escape character for text strings.
1175
1176
void
gesc(
char
*p_esc );
1177
1178
// Front-end to driver escape function.
1179
1180
void
cmd
(
PLINT
op,
void
*ptr );
1181
1182
// Return full pathname for given file if executable
1183
1184
int
FindName(
char
*p );
1185
1186
// Looks for the specified executable file according to usual search path.
1187
1188
char
*FindCommand(
char
*fn );
1189
1190
// Gets search name for file by concatenating the dir, subdir, and file
1191
// name, allocating memory as needed.
1192
1193
void
GetName(
char
*dir,
char
*subdir,
char
*filename,
char
**filespec );
1194
1195
// Prompts human to input an integer in response to given message.
1196
1197
PLINT
GetInt(
char
*s );
1198
1199
// Prompts human to input a float in response to given message.
1200
1201
PLFLT
GetFlt(
char
*s );
1202
1203
// Nice way to allocate space for a vectored 2d grid
1204
1205
// Allocates a block of memory for use as a 2-d grid of PLFLT's.
1206
1207
void
Alloc2dGrid(
PLFLT
***f,
PLINT
nx,
PLINT
ny );
1208
1209
// Frees a block of memory allocated with plAlloc2dGrid().
1210
1211
void
Free2dGrid(
PLFLT
**f,
PLINT
nx,
PLINT
ny );
1212
1213
// Find the maximum and minimum of a 2d matrix allocated with plAllc2dGrid().
1214
void
MinMax2dGrid(
const
PLFLT
*
const
*f,
PLINT
nx,
PLINT
ny,
PLFLT
*fmax,
PLFLT
*fmin );
1215
1216
// Functions for converting between HLS and RGB color space
1217
1218
void
hlsrgb(
PLFLT
h,
PLFLT
l,
PLFLT
s,
1219
PLFLT
*p_r,
PLFLT
*p_g,
PLFLT
*p_b );
1220
1221
void
rgbhls(
PLFLT
r,
PLFLT
g,
PLFLT
b,
1222
PLFLT
*p_h,
PLFLT
*p_l,
PLFLT
*p_s );
1223
1224
// Wait for graphics input event and translate to world coordinates
1225
1226
int
GetCursor(
PLGraphicsIn
*plg );
1227
1228
// Deprecated versions of methods which use PLINT instead of bool
1229
void
svect(
const
PLFLT
*arrow_x,
const
PLFLT
*arrow_y,
PLINT
npts,
PLINT
fill
);
1230
void
cpstrm(
plstream
&pls,
PLINT
flags );
1231
void
plot3d
(
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*
const
*z,
1232
PLINT
nx,
PLINT
ny,
PLINT
opt,
PLINT
side );
1233
void
poly3(
PLINT
n,
const
PLFLT
*x,
const
PLFLT
*y,
const
PLFLT
*z,
const
PLINT
*draw,
PLINT
ifcc );
1234
void
scmap1l(
PLINT
itype,
PLINT
npts,
const
PLFLT
*intensity,
1235
const
PLFLT
*coord1,
const
PLFLT
*coord2,
const
PLFLT
*coord3,
const
PLINT
*alt_hue_path );
1236
1237
void
shade(
const
PLFLT
*
const
*a,
PLINT
nx,
PLINT
ny,
1238
PLINT
( *defined )(
PLFLT
,
PLFLT
),
1239
PLFLT
left,
PLFLT
right,
PLFLT
bottom,
PLFLT
top,
1240
PLFLT
shade_min,
PLFLT
shade_max,
1241
PLINT
sh_cmap,
PLFLT
sh_color,
PLFLT
sh_width,
1242
PLINT
min_color,
PLFLT
min_width,
1243
PLINT
max_color,
PLFLT
max_width,
1244
void
( *
fill
)(
PLINT
,
const
PLFLT
*,
const
PLFLT
* ),
PLINT
rectangular,
1245
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
1246
PLPointer
pltr_data );
1247
1248
void
shades(
const
PLFLT
*
const
*a,
PLINT
nx,
PLINT
ny,
PLINT
( *defined )(
PLFLT
,
1249
PLFLT
),
1250
PLFLT
xmin,
PLFLT
xmax,
PLFLT
ymin,
PLFLT
ymax,
1251
const
PLFLT
* clevel,
PLINT
nlevel,
PLFLT
fill_width,
1252
PLINT
cont_color,
PLFLT
cont_width,
1253
void
( *
fill
)(
PLINT
,
const
PLFLT
*,
const
PLFLT
* ),
PLINT
rectangular,
1254
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
1255
PLPointer
pltr_data );
1256
1257
void
shade(
Contourable_Data
& d,
PLFLT
xmin,
PLFLT
xmax,
1258
PLFLT
ymin,
PLFLT
ymax,
PLFLT
shade_min,
PLFLT
shade_max,
1259
PLINT
sh_cmap,
PLFLT
sh_color,
PLFLT
sh_width,
1260
PLINT
min_color,
PLFLT
min_width,
1261
PLINT
max_color,
PLFLT
max_width,
1262
PLINT
rectangular,
1263
Coord_Xformer
*pcxf );
1264
1265
void
shade1(
const
PLFLT
* a,
PLINT
nx,
PLINT
ny,
1266
PLINT
( *defined )(
PLFLT
,
PLFLT
),
1267
PLFLT
left,
PLFLT
right,
PLFLT
bottom,
PLFLT
top,
1268
PLFLT
shade_min,
PLFLT
shade_max,
1269
PLINT
sh_cmap,
PLFLT
sh_color,
PLFLT
sh_width,
1270
PLINT
min_color,
PLFLT
min_width,
1271
PLINT
max_color,
PLFLT
max_width,
1272
void
( *
fill
)(
PLINT
,
const
PLFLT
*,
const
PLFLT
* ),
PLINT
rectangular,
1273
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
1274
PLPointer
pltr_data );
1275
1276
void
fshade(
PLFLT
( *f2eval )(
PLINT
,
PLINT
,
PLPointer
),
1277
PLPointer
f2eval_data,
1278
PLFLT
( *c2eval )(
PLINT
,
PLINT
,
PLPointer
),
1279
PLPointer
c2eval_data,
1280
PLINT
nx,
PLINT
ny,
1281
PLFLT
left,
PLFLT
right,
PLFLT
bottom,
PLFLT
top,
1282
PLFLT
shade_min,
PLFLT
shade_max,
1283
PLINT
sh_cmap,
PLFLT
sh_color,
PLFLT
sh_width,
1284
PLINT
min_color,
PLFLT
min_width,
1285
PLINT
max_color,
PLFLT
max_width,
1286
void
( *
fill
)(
PLINT
,
const
PLFLT
*,
const
PLFLT
* ),
PLINT
rectangular,
1287
void
( *
pltr
)(
PLFLT
,
PLFLT
,
PLFLT
*,
PLFLT
*,
PLPointer
),
1288
PLPointer
pltr_data );
1289
1290
void
spause(
PLINT
pause );
1291
1292
void
stripc
(
PLINT
*
id
,
const
char
*xspec,
const
char
*yspec,
1293
PLFLT
xmin,
PLFLT
xmax,
PLFLT
xjump,
PLFLT
ymin,
PLFLT
ymax,
1294
PLFLT
xlpos,
PLFLT
ylpos,
1295
PLINT
y_ascl,
PLINT
acc,
1296
PLINT
colbox,
PLINT
collab,
1297
const
PLINT
colline[],
const
PLINT
styline[],
const
char
*legline[],
1298
const
char
*labx,
const
char
*laby,
const
char
*labtop );
1299
1300
void
xormod(
PLINT
mode,
PLINT
*status );
1301
};
1302
1303
1304
1305
#endif // __plstream_h__
1306
1307
//--------------------------------------------------------------------------
1308
// end of plstream.h
1309
//--------------------------------------------------------------------------
plplot_source
bindings
c++
plstream.h
Generated on Sun Apr 12 2015 03:08:39 for PLplot by
1.8.1.2