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