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