File Coverage

blib/lib/PDL/Graphics/PLplot.pm
Criterion Covered Total %
statement 18 20 90.0
branch n/a
condition n/a
subroutine 12 14 85.7
pod 0 11 0.0
total 30 45 66.6


line stmt bran cond sub pod time code
1             #
2             # GENERATED WITH PDL::PP from plplot.pd! Don't modify!
3             #
4             package PDL::Graphics::PLplot;
5              
6             our @EXPORT_OK = qw(PL_PARSE_PARTIAL PL_PARSE_FULL PL_PARSE_QUIET PL_PARSE_NODELETE PL_PARSE_SHOWALL PL_PARSE_OVERRIDE PL_PARSE_NOPROGRAM PL_PARSE_NODASH PL_PARSE_SKIP PL_NOTSET DRAW_LINEX DRAW_LINEY DRAW_LINEXY MAG_COLOR BASE_CONT TOP_CONT SURF_CONT DRAW_SIDES FACETED MESH PL_FCI_SANS PL_FCI_MONO PLK_BackSpace PLK_Tab PLK_Linefeed PLK_Return PLK_Escape PLK_Delete PLK_Clear PLK_Pause PLK_Scroll_Lock PLK_Home PLK_Left PLK_Up PLK_Right PLK_Down PLK_Prior PLK_Next PLK_End PLK_Begin PLK_Select PLK_Print PLK_Execute PLK_Insert PLK_Undo PLK_Redo PLK_Menu PLK_Find PLK_Cancel PLK_Help PLK_Break PLK_Mode_switch PLK_script_switch PLK_Num_Lock PLK_KP_Space PLK_KP_Tab PLK_KP_Enter PLK_KP_F1 PLK_KP_F2 PLK_KP_F3 PLK_KP_F4 PLK_KP_Equal PLK_KP_Multiply PLK_KP_Add PLK_KP_Separator PLK_KP_Subtract PLK_KP_Decimal PLK_KP_Divide PLK_KP_0 PLK_KP_1 PLK_KP_2 PLK_KP_3 PLK_KP_4 PLK_KP_5 PLK_KP_6 PLK_KP_7 PLK_KP_8 PLK_KP_9 PLK_F1 PLK_F2 PLK_F3 PLK_F4 PLK_F5 PLK_F6 PLK_F7 PLK_F8 PLK_F9 PLK_F10 PLK_F11 PLK_L1 PLK_F12 PLK_L2 PLK_F13 PLK_L3 PLK_F14 PLK_L4 PLK_F15 PLK_L5 PLK_F16 PLK_L6 PLK_F17 PLK_L7 PLK_F18 PLK_L8 PLK_F19 PLK_L9 PLK_F20 PLK_L10 PLK_F21 PLK_R1 PLK_F22 PLK_R2 PLK_F23 PLK_R3 PLK_F24 PLK_R4 PLK_F25 PLK_R5 PLK_F26 PLK_R6 PLK_F27 PLK_R7 PLK_F28 PLK_R8 PLK_F29 PLK_R9 PLK_F30 PLK_R10 PLK_F31 PLK_R11 PLK_F32 PLK_R12 PLK_R13 PLK_F33 PLK_F34 PLK_R14 PLK_F35 PLK_R15 PLK_Shift_L PLK_Shift_R PLK_Control_L PLK_Control_R PLK_Caps_Lock PLK_Shift_Lock PLK_Meta_L PLK_Meta_R PLK_Alt_L PLK_Alt_R PLK_Super_L PLK_Super_R PLK_Hyper_L PLK_Hyper_R GRID_CSA GRID_DTLI GRID_NNI GRID_NNIDW GRID_NNLI GRID_NNAIDW PL_X_AXIS PL_Y_AXIS PL_Z_AXIS PL_COLORBAR_SHADE PL_COLORBAR_SHADE_LABEL PL_COLORBAR_IMAGE PL_COLORBAR_GRADIENT PL_COLORBAR_CAP_NONE PL_COLORBAR_CAP_LOW PL_COLORBAR_CAP_HIGH PL_COLORBAR_LABEL_LEFT PL_COLORBAR_LABEL_RIGHT PL_COLORBAR_LABEL_TOP PL_COLORBAR_LABEL_BOTTOM PL_LEGEND_BACKGROUND PL_LEGEND_BOUNDING_BOX PL_LEGEND_COLOR_BOX PL_LEGEND_LINE PL_LEGEND_NONE PL_LEGEND_ROW_MAJOR PL_LEGEND_SYMBOL PL_LEGEND_TEXT_LEFT PL_POSITION_BOTTOM PL_POSITION_INSIDE PL_POSITION_LEFT PL_POSITION_OUTSIDE PL_POSITION_RIGHT PL_POSITION_SUBPAGE PL_POSITION_TOP PL_POSITION_VIEWPORT plplot_use_standard_argument_order pladv plaxes plbin plbop plbox plbox3 plclear plcol0 plcol1 plcpstrm pldid2pc pldip2dc plend plend1 plenv plenv0 pleop plerrx plerry plfamadv plfill3 plflush plfont plfontld plgchr plgcompression plgdidev plgdiori plgdiplt plgfam plglevel plgpage plgra plgspa plgvpd plgvpw plgxax plgyax plgzax plinit pljoin pllab pllightsource pllsty plmtex plmtex3 plpat plprec plpsty plptex plptex3 plreplot plschr plscmap0n plscmap1n plscol0 plscolbg plscolor plscompression plsdev plgDevs plgFileDevs plsdidev plsdimap plsdiori plsdiplt plsdiplz pl_setcontlabelparam pl_setcontlabelformat plsfam plsfnam plsmaj plsmin plsori plspage plspause plsstrm plssub plssym plstar plstart plstripa plstripd plsvpa plsxax plsxwin plsyax plszax pltext plvasp plvpas plvpor plvsta plw3d plwidth plwind plsetopt plP_gpixmm plscolbga plscol0a plline plpath plcolorpoints plsmem plfbox plfbox1 plunfbox plunfbox1 plParseOpts plpoin plpoin3 plline3 plpoly3 plhist plfill plgradient plsym plsurf3d plsurf3dl plstyl plseed plrandd pltr0 pltr1 pltr2 plAllocGrid plFreeGrid plAlloc2dGrid plFree2dGrid init_pltr plmap plstring plstring3 plmeridians plshades plcont plmesh plmeshc plot3d plot3dc plscmap1l plshade1 plimage plimagefr plxormod plGetCursor plgstrm plgdev plgfnam plmkstrm plgver plstripc plgriddata plarc plstransform plslabelfunc pllegend plspal0 plspal1 plbtime plconfigtime plctime pltimefmt plsesc plvect plsvect plhlsrgb plgcol0 plgcolbg plscmap0 plscmap1 plgcol0a plgcolbga plscmap0a plscmap1a plscmap1la plgfont plsfont plcalc_world plgfci plsfci pl_cmd pl_setCairoCtx );
7             our %EXPORT_TAGS = (Func=>\@EXPORT_OK);
8              
9 32     32   6598025 use PDL::Core;
  32         92  
  32         276  
10 32     32   13672 use PDL::Exporter;
  32         72  
  32         263  
11 32     32   1106 use DynaLoader;
  32         71  
  32         27563  
12              
13              
14            
15             our @ISA = ( 'PDL::Exporter','DynaLoader' );
16             push @PDL::Core::PP, __PACKAGE__;
17             bootstrap PDL::Graphics::PLplot ;
18              
19              
20              
21              
22              
23              
24              
25              
26             #line 6 "plplot.pd"
27              
28             use Carp qw(confess);
29              
30             our $VERSION;
31             BEGIN {
32             $VERSION = '0.84';
33             };
34              
35             =head1 NAME
36              
37             PDL::Graphics::PLplot - Object-oriented interface from perl/PDL to the PLPLOT plotting library
38              
39             =head1 SYNOPSIS
40              
41             use PDL;
42             use PDL::Graphics::PLplot;
43              
44             my $pl = PDL::Graphics::PLplot->new (DEV => "png", FILE => "test.png");
45             my $x = sequence(10);
46             my $y = $x**2;
47             $pl->xyplot($x, $y);
48             $pl->close;
49              
50             Only version 5.15.0+ of PLplot is fully supported, due to a C-level API change
51             that is invisible at PDL-level. However, the library does support installation
52             with PLplot 5.13.0+.
53              
54             For more information on PLplot, see
55              
56             http://www.plplot.org/
57              
58             Also see the test file, F in this distribution for some working examples.
59              
60             =head1 LONG NAMES
61              
62             If you are annoyed by the long constructor call, consider installing the
63             L CPAN package. Using C, the above example
64             becomes
65              
66             use PDL;
67             use aliased 'PDL::Graphics::PLplot';
68              
69             my $pl = PLplot->new (DEV => "png", FILE => "test.png");
70             my $x = sequence(10);
71             # etc, as above
72              
73             =head1 DESCRIPTION
74              
75             This is the PDL interface to the PLplot graphics library. It provides
76             a familiar 'perlish' Object Oriented interface as well as access to
77             the low-level PLplot commands from the C-API.
78              
79             =head1 OPTIONS
80              
81             The following options are supported. Most options can be used
82             with any function. A few are only supported on the call to 'new'.
83              
84             =head2 Options used upon creation of a PLplot object (with 'new'):
85              
86             =head3 BACKGROUND
87              
88             Set the color for index 0, the plot background
89              
90             =head3 DEV
91              
92             Set the output device type. To see a list of allowed types, try:
93              
94             PDL::Graphics::PLplot->new();
95              
96             =for example
97              
98             PDL::Graphics::PLplot->new(DEV => 'png', FILE => 'test.png');
99              
100             =head3 FILE
101              
102             Set the output file or display. For file output devices, sets
103             the output file name. For graphical displays (like C<'xwin'>) sets
104             the name of the display, eg (C<'hostname.foobar.com:0'>)
105              
106             =for example
107              
108             PDL::Graphics::PLplot->new(DEV => 'png', FILE => 'test.png');
109             PDL::Graphics::PLplot->new(DEV => 'xwin', FILE => ':0');
110              
111             =head3 OPTS
112              
113             Set plotting options. See the PLplot documentation for the complete
114             listing of available options. The value of C<'OPTS'> must be a hash
115             reference, whose keys are the names of the options. For instance, to obtain
116             PostScript fonts with the ps output device, use:
117              
118             =for example
119              
120             PDL::Graphics::PLplot->new(DEV => 'ps', OPTS => {drvopt => 'text=1'});
121              
122             =head3 MEM
123              
124             This option is used in conjunction with C<< DEV => 'mem' >>. This option
125             takes as input a PDL image and allows one to 'decorate' it using PLplot.
126             The 'decorated' PDL image can then be written to an image file using,
127             for example, L. This option may not be available if
128             plplot does not include the 'mem' driver.
129              
130             =for example
131              
132             # read in Earth image and draw an equator.
133             my $pl = PDL::Graphics::PLplot->new (MEM => $earth, DEV => 'mem');
134             my $x = pdl(-180, 180);
135             my $y = zeroes(2);
136             $pl->xyplot($x, $y,
137             BOX => [-180,180,-90,90],
138             VIEWPORT => [0.0, 1.0, 0.0, 1.0],
139             XBOX => '', YBOX => '',
140             PLOTTYPE => 'LINE');
141             $pl->close;
142              
143             =head3 FRAMECOLOR
144              
145             Set color index 1, the frame color
146              
147             =head3 JUST
148              
149             A flag used to specify equal scale on the axes. If this is
150             not specified, the default is to scale the axes to fit best on
151             the page.
152              
153             =for example
154              
155             PDL::Graphics::PLplot->new(DEV => 'png', FILE => 'test.png', JUST => 1);
156              
157             =head3 ORIENTATION
158              
159             The orientation of the plot:
160              
161             0 -- 0 degrees (landscape mode)
162             1 -- 90 degrees (portrait mode)
163             2 -- 180 degrees (seascape mode)
164             3 -- 270 degrees (upside-down mode)
165              
166             Intermediate values (0.2) are acceptable if you are feeling daring.
167              
168             =for example
169              
170             # portrait orientation
171             PDL::Graphics::PLplot->new(DEV => 'png', FILE => 'test.png', ORIENTATION => 1);
172              
173             =head3 PAGESIZE
174              
175             Set the size in pixels of the output page.
176              
177             =for example
178              
179             # PNG 500 by 600 pixels
180             PDL::Graphics::PLplot->new(DEV => 'png', FILE => 'test.png', PAGESIZE => [500,600]);
181              
182             =head3 SUBPAGES
183              
184             Set the number of sub pages in the plot, [$nx, $ny]
185              
186             =for example
187              
188             # PNG 300 by 600 pixels
189             # Two subpages stacked on top of one another.
190             PDL::Graphics::PLplot->new(DEV => 'png', FILE => 'test.png', PAGESIZE => [300,600],
191             SUBPAGES => [1,2]);
192              
193             =head2 Options used after initialization (after 'new')
194              
195             =head3 BOX
196              
197             Set the plotting box in world coordinates. Used to explicitly
198             set the size of the plotting area.
199              
200             =for example
201              
202             my $pl = PDL::Graphics::PLplot->new(DEV => 'png', FILE => 'test.png');
203             $pl->xyplot ($x, $y, BOX => [0,100,0,200]);
204              
205             =head3 CHARSIZE
206              
207             Set the size of text in multiples of the default size.
208             C<< CHARSIZE => 1.5 >> gives characters 1.5 times the normal size.
209              
210             =head3 COLOR
211              
212             Set the current color for plotting and character drawing.
213             Colors are specified not as color indices but as RGB triples.
214             Some pre-defined triples are included:
215              
216             BLACK GREEN WHEAT BLUE
217             RED AQUAMARINE GREY BLUEVIOLET
218             YELLOW PINK BROWN CYAN
219             TURQUOISE MAGENTA SALMON WHITE
220             ROYALBLUE DEEPSKYBLUE VIOLET STEELBLUE1
221             DEEPPINK MAGENTA DARKORCHID1 PALEVIOLETRED2
222             TURQUOISE1 LIGHTSEAGREEN SKYBLUE FORESTGREEN
223             CHARTREUSE3 GOLD2 SIENNA1 CORAL
224             HOTPINK LIGHTCORAL LIGHTPINK1 LIGHTGOLDENROD
225              
226             =for example
227              
228             # These two are equivalent:
229             $pl->xyplot ($x, $y, COLOR => 'YELLOW');
230             $pl->xyplot ($x, $y, COLOR => [0,255,0]);
231              
232             =head3 CONTOURLABELS
233              
234             Control of labels for contour plots.
235              
236             Must either be 0 (turn off contour labels), 1 (turn on default contour labels)
237             or a five element array:
238              
239             offset: Offset of label from contour line (if set to 0.0, labels are printed on the lines). Default value is 0.006.
240             size: Font height for contour labels (normalized). Default value is 0.3.
241             spacing: Spacing parameter for contour labels. Default value is 0.1.
242             lexp: If the contour numerical label is greater than 10^(lexp) or less than 10^(-lexp),
243             then the exponential format is used. Default value of lexp is 4.
244             sigdig: Number of significant digits. Default value is 2";
245              
246             =for example
247              
248             $pl->shadeplot ($z, $nsteps, BOX => [-1, 1, -1, 1], PLOTTYPE => 'CONTOUR', CONTOURLABELS => [0.004, 0.2, 0.2, 4, 2]);
249             $pl->shadeplot ($z, $nsteps, BOX => [-1, 1, -1, 1], PLOTTYPE => 'CONTOUR', CONTOURLABELS => 0); # turn off labels
250             $pl->shadeplot ($z, $nsteps, BOX => [-1, 1, -1, 1], PLOTTYPE => 'CONTOUR', CONTOURLABELS => 1); # use default labels
251              
252             =head3 GRIDMAP
253              
254             Set a user-defined grid map. This is an X and Y vector that
255             tells what are the world coordinates for each pixel in $z
256             It is used in 'shadeplot' for non-standard mappings between the
257             input 2D surface to plot and the world coordinates. For example
258             if your surface does not completely fill up the plotting window.
259              
260             =for example
261              
262             my $z = $surface; # 2D PDL to plot (generated elsewhere)
263             my $nlevels = 20;
264             my ($nx, $ny) = $z->dims;
265             my @zbounds = ($minx, $maxx, $miny, $maxy);
266              
267             # Map X coords linearly to X range, Y coords linearly to Y range
268             my $xmap = ((sequence($nx)*(($zbounds[1] - $zbounds[0])/($nx - 1))) + $zbounds[0]);
269             my $ymap = ((sequence($ny)*(($zbounds[3] - $zbounds[2])/($ny - 1))) + $zbounds[2]);
270             $pl->shadeplot ($z, $nlevels, PALETTE => 'GREENRED', GRIDMAP => [$xmap, $ymap]);
271              
272             =head3 GRIDMAP2
273              
274             Set a user-defined two dimensional grid map. These are 2D X and Y matrices that
275             tell what are the world coordinates for each pixel in $z
276             It is used in 'shadeplot' for non-standard mappings between the
277             input 2D surface to plot and the world coordinates, for example
278             irregular grids like polar projections.
279              
280             =for example
281              
282             my $r_pts = 40;
283             my $theta_pts = 40;
284             my $pi = 4*atan2(1,1);
285             my $nlevels = 20;
286              
287             my $r = ((sequence ($r_pts)) / ($r_pts - 1))->dummy (1, $theta_pts);
288             my $z = $r; # or any other 2D surface to plot...
289             my $theta = ((2 * $pi / ($theta_pts - 2)) * sequence ($theta_pts))->dummy (0, $r_pts);
290             my $xmap = $r * cos ($theta);
291             my $ymap = $r * sin ($theta);
292              
293             $pl->shadeplot ($z, $nlevels, PLOTTYPE => 'CONTOUR',
294             JUST => 1,
295             BOX => [-1,1,-1,1],
296             PALETTE => 'GREENRED',
297             GRIDMAP2 => [$xmap, $ymap]);
298              
299             =head3 LINEWIDTH
300              
301             Set the line width for plotting. Values range from 1 to a device dependent maximum.
302              
303             =head3 LINESTYLE
304              
305             Set the line style for plotting. Pre-defined line styles use values 1 to 8, one being
306             a solid line, 2-8 being various dashed patterns.
307              
308             =head3 MAJTICKSIZE
309              
310             Set the length of major ticks as a fraction of the default setting.
311             One (default) means leave these ticks the normal size.
312              
313             =head3 MINTICKSIZE
314              
315             Set the length of minor ticks (and error bar terminals) as a fraction of the default setting.
316             One (default) means leave these ticks the normal size.
317              
318             =head3 NXSUB
319              
320             The number of minor tick marks between each major tick mark on the X axis.
321             Specify zero (default) to let PLplot compute this automatically.
322              
323             =head3 NYSUB
324              
325             The number of minor tick marks between each major tick mark on the Y axis.
326             Specify zero (default) to let PLplot compute this automatically.
327              
328             =head3 PALETTE
329              
330             Load pre-defined color map 1 color ranges. Currently, values include:
331              
332             RAINBOW -- from Red to Violet through the spectrum
333             REVERSERAINBOW -- Violet through Red
334             GREYSCALE -- from black to white via grey.
335             REVERSEGREYSCALE -- from white to black via grey.
336             GREENRED -- from green to red
337             REDGREEN -- from red to green
338              
339             =for example
340              
341             # Plot x/y points with the z axis in color
342             $pl->xyplot ($x, $y, PALETTE => 'RAINBOW', PLOTTYPE => 'POINTS', COLORMAP => $z);
343              
344             =head3 PLOTTYPE
345              
346             Specify which type of XY or shade plot is desired:
347              
348             LINE -- A line
349             POINTS -- A bunch of symbols
350             LINEPOINTS -- both
351              
352             or, for 'shadeplot':
353             CONTOUR -- A contour plot of 2D data
354             SHADE -- A shade plot of 2D data
355              
356             =head3 STACKED_BAR_COLORS
357              
358             For 'bargraph', request a stacked bar chart.
359             Must contain a reference to a perl list of color names or RGB triples.
360              
361             =for example
362              
363             # $labels is a reference to a perl array with N x-axis labels
364             # $values is an NxM PDL where M is the number of stacked bars (in this case 2,
365             # since STACKED_BAR_COLORS contains two colors).
366             $pl->bargraph($labels, $values, STACKED_BAR_COLORS => ['GREEN', [128,0,55]);
367              
368             =head3 SUBPAGE
369              
370             Set which subpage to plot on. Subpages are numbered 1 to N.
371             A zero can be specified meaning 'advance to the next subpage' (just a call to
372             L).
373              
374             =for example
375              
376             my $pl = PDL::Graphics::PLplot->new(DEV => 'png',
377             FILE => 'test.png',
378             SUBPAGES => [1,2]);
379             $pl->xyplot ($x, $y, SUBPAGE => 1);
380             $pl->xyplot ($a, $b, SUBPAGE => 2);
381              
382             =head3 SYMBOL
383              
384             Specify which symbol to use when plotting C<< PLOTTYPE => 'POINTS' >>.
385             A large variety of symbols are available, see:
386             http://plplot.sourceforge.net/examples-data/demo07/x07.*.png, where * is 01 - 17.
387             You are most likely to find good plotting symbols in the 800s:
388             http://plplot.sourceforge.net/examples-data/demo07/x07.06.png
389              
390             =head3 SYMBOLSIZE
391              
392             Specify the size of symbols plotted in multiples of the default size (1).
393             Value are real numbers from 0 to large.
394              
395             =head3 TEXTPOSITION
396              
397             Specify the placement of text. Either relative to border, specified as:
398              
399             [$side, $disp, $pos, $just]
400              
401             Where
402              
403             side = 't', 'b', 'l', or 'r' for top, bottom, left and right
404             disp is the number of character heights out from the edge
405             pos is the position along the edge of the viewport, from 0 to 1.
406             just tells where the reference point of the string is: 0 = left, 1 = right, 0.5 = center.
407              
408             or inside the plot window, specified as:
409              
410             [$x, $y, $dx, $dy, $just]
411              
412             Where
413              
414             x = x coordinate of reference point of string.
415             y = y coordinate of reference point of string.
416             dx Together with dy, this specifies the inclination of the string.
417             The baseline of the string is parallel to a line joining (x, y) to (x+dx, y+dy).
418             dy Together with dx, this specifies the inclination of the string.
419             just Specifies the position of the string relative to its reference point.
420             If just=0, the reference point is at the left and if just=1,
421             it is at the right of the string. Other values of just give
422             intermediate justifications.
423              
424             =for example
425              
426             # Plot text on top of plot
427             $pl->text ("Top label", TEXTPOSITION => ['t', 4.0, 0.5, 0.5]);
428              
429             # Plot text in plotting area
430             $pl->text ("Line label", TEXTPOSITION => [50, 60, 5, 5, 0.5]);
431              
432             =head3 TITLE
433              
434             Add a title on top of a plot.
435              
436             =for example
437              
438             # Plot text on top of plot
439             $pl->xyplot ($x, $y, TITLE => 'X vs. Y');
440              
441             =head3 UNFILLED_BARS
442              
443             For 'bargraph', if set to true then plot the bars as outlines
444             in the current color and not as filled boxes
445              
446             =for example
447              
448             # Plot text on top of plot
449             $pl->bargraph($labels, $values, UNFILLED_BARS => 1);
450              
451             =head3 VIEWPORT
452              
453             Set the location of the plotting window on the page.
454             Takes a four element array ref specifying:
455              
456             xmin -- The coordinate of the left-hand edge of the viewport. (0 to 1)
457             xmax -- The coordinate of the right-hand edge of the viewport. (0 to 1)
458             ymin -- The coordinate of the bottom edge of the viewport. (0 to 1)
459             ymax -- The coordinate of the top edge of the viewport. (0 to 1)
460              
461             You will need to use this to make color keys or insets.
462              
463             =for example
464              
465             # Make a small plotting window in the lower left of the page
466             $pl->xyplot ($x, $y, VIEWPORT => [0.1, 0.5, 0.1, 0.5]);
467              
468             # Also useful in creating color keys:
469             $pl->xyplot ($x, $y, PALETTE => 'RAINBOW', PLOTTYPE => 'POINTS', COLORMAP => $z);
470             $pl->colorkey ($z, 'v', VIEWPORT => [0.93, 0.96, 0.15, 0.85]);
471              
472             # Plot an inset; first the primary data and then the inset. In this
473             # case, the inset contains a selection of the orignal data
474             $pl->xyplot ($x, $y);
475             $pl->xyplot (where($x, $y, $x < 1.2), VIEWPORT => [0.7, 0.9, 0.6, 0.8]);
476              
477             =head3 XBOX
478              
479             Specify how to label the X axis of the plot as a string of option letters:
480              
481             a: Draws axis, X-axis is horizontal line (y=0), and Y-axis is vertical line (x=0).
482             b: Draws bottom (X) or left (Y) edge of frame.
483             c: Draws top (X) or right (Y) edge of frame.
484             d: Plot labels as date / time. Values are assumed to be seconds since the epoch (as used by gmtime).
485             f: Always use fixed point numeric labels.
486             g: Draws a grid at the major tick interval.
487             h: Draws a grid at the minor tick interval.
488             i: Inverts tick marks, so they are drawn outwards, rather than inwards.
489             l: Labels axis logarithmically. This only affects the labels, not the data,
490             and so it is necessary to compute the logarithms of data points before
491             passing them to any of the drawing routines.
492             m: Writes numeric labels at major tick intervals in the
493             unconventional location (above box for X, right of box for Y).
494             n: Writes numeric labels at major tick intervals in the conventional location
495             (below box for X, left of box for Y).
496             s: Enables subticks between major ticks, only valid if t is also specified.
497             t: Draws major ticks.
498              
499             The default is C<'BCNST'> which draws lines around the plot, draws major and minor
500             ticks and labels major ticks.
501              
502             =for example
503              
504             # plot two lines in a box with independent X axes labeled
505             # differently on top and bottom
506             $pl->xyplot($x1, $y, XBOX => 'bnst', # bottom line, bottom numbers, ticks, subticks
507             YBOX => 'bnst'); # left line, left numbers, ticks, subticks
508             $pl->xyplot($x2, $y, XBOX => 'cmst', # top line, top numbers, ticks, subticks
509             YBOX => 'cst', # right line, ticks, subticks
510             BOX => [$x2->minmax, $y->minmax]);
511              
512             =head3 XERRORBAR
513              
514             Used only with L. Draws horizontal error bars at all points (C<$x>, C<$y>) in the plot.
515             Specify a PDL containing the same number of points as C<$x> and C<$y>
516             which specifies the width of the error bar, which will be centered at (C<$x>, C<$y>).
517              
518             =head3 XLAB
519              
520             Specify a label for the X axis.
521              
522             =head3 XTICK
523              
524             Interval (in graph units/world coordinates) between major x axis tick marks.
525             Specify zero (default) to allow PLplot to compute this automatically.
526              
527             =head3 YBOX
528              
529             Specify how to label the Y axis of the plot as a string of option letters.
530             See L.
531              
532             =head3 YERRORBAR
533              
534             Used only for xyplot. Draws vertical error bars at all points (C<$x>, C<$y>) in the plot.
535             Specify a PDL containing the same number of points as C<$x> and C<$y>
536             which specifies the width of the error bar, which will be centered at (C<$x>, C<$y>).
537              
538             =head3 YLAB
539              
540             Specify a label for the Y axis.
541              
542             =head3 YTICK
543              
544             Interval (in graph units/world coordinates) between major y axis tick marks.
545             Specify zero (default) to allow PLplot to compute this automatically.
546              
547             =head3 ZRANGE
548              
549             For L (when C is specified), for
550             L and for L.
551             Normally, the range of the Z variable (color) is taken as
552             C<< $z->minmax >>. If a different range is desired,
553             specify it in C, like so:
554              
555             $pl->shadeplot ($z, $nlevels, PALETTE => 'GREENRED', ZRANGE => [0,100]);
556              
557             or
558              
559             $pl->xyplot ($x, $y, PALETTE => 'RAINBOW', PLOTTYPE => 'POINTS',
560             COLORMAP => $z, ZRANGE => [-90,-20]);
561             $pl->colorkey ($z, 'v', VIEWPORT => [0.93, 0.96, 0.13, 0.85],
562             ZRANGE => [-90,-20]);
563              
564             =head1 METHODS
565              
566             These are the high-level, object oriented methods for PLplot.
567              
568             =head2 new
569              
570             =for ref
571              
572             Create an object representing a plot.
573              
574             =for usage
575              
576             Arguments:
577             none.
578              
579             Supported options:
580             BACKGROUND
581             DEV
582             FILE
583             FRAMECOLOR
584             JUST
585             PAGESIZE
586             SUBPAGES
587              
588             =for example
589              
590             my $pl = PDL::Graphics::PLplot->new(DEV => 'png', FILE => 'test.png');
591              
592             =head2 setparm
593              
594             =for ref
595              
596             Set options for a plot object.
597              
598             =for usage
599              
600             Arguments:
601             none.
602              
603             Supported options:
604             All options except:
605              
606             BACKGROUND
607             DEV
608             FILE
609             FRAMECOLOR
610             JUST
611             PAGESIZE
612             SUBPAGES
613              
614             (These must be set in call to 'new'.)
615              
616             =for example
617              
618             $pl->setparm (TEXTSIZE => 2);
619              
620             =head2 xyplot
621              
622             =for ref
623              
624             Plot XY lines and/or points. Also supports color scales for points.
625             This function works with bad values. If a bad value is specified for
626             a points plot, it is omitted. If a bad value is specified for a line
627             plot, the bad value makes a gap in the line. This is useful for
628             drawing maps; for example C<$x> and C<$y> can be the continent boundary
629             latitude and longitude.
630              
631             =for usage
632              
633             Arguments:
634             $x, $y
635              
636             Supported options:
637             All options except:
638              
639             BACKGROUND
640             DEV
641             FILE
642             FRAMECOLOR
643             JUST
644             PAGESIZE
645             SUBPAGES
646              
647             (These must be set in call to 'new'.)
648              
649             =for example
650              
651             $pl->xyplot($x, $y, PLOTTYPE => 'POINTS', COLOR => 'BLUEVIOLET', SYMBOL => 1, SYMBOLSIZE => 4);
652             $pl->xyplot($x, $y, PLOTTYPE => 'LINEPOINTS', COLOR => [50,230,30]);
653             $pl->xyplot($x, $y, PALETTE => 'RAINBOW', PLOTTYPE => 'POINTS', COLORMAP => $z);
654              
655             =head2 stripplots
656              
657             =for ref
658              
659             Plot a set of strip plots with a common X axis, but with different Y axes.
660             Looks like a stack of long, thin XY plots, all line up on the same X axis.
661              
662             =for usage
663              
664             Arguments:
665             $xs -- 1D PDL with common X axis values, length = N
666             $ys -- reference to a list of 1D PDLs with Y-axis values, length = N
667             or 2D PDL with N x M elements
668             -- OR --
669             $xs -- reference to a list of 1D PDLs with X-axis values
670             $ys -- reference to a list of 1D PDLs with Y-axis values
671             %opts -- Options hash
672              
673             Supported options:
674             All options except:
675              
676             BACKGROUND
677             DEV
678             FILE
679             FRAMECOLOR
680             JUST
681             PAGESIZE
682             SUBPAGES
683              
684             (These must be set in call to 'new'.)
685              
686             =for example
687              
688             my $x = sequence(20);
689             my $y1 = $x**2;
690             my $y2 = sqrt($x);
691             my $y3 = $x**3;
692             my $y4 = sin(($x/20) * 2 * $pi);
693             $ys = cat($y1, $y2, $y3, $y4);
694             $pl->stripplots($x, $ys, PLOTTYPE => 'LINE', TITLE => 'functions',
695             YLAB => ['x**2', 'sqrt(x)', 'x**3', 'sin(x/20*2pi)'],
696             COLOR => ['GREEN', 'DEEPSKYBLUE', 'DARKORCHID1', 'DEEPPINK'], XLAB => 'X label');
697             # Equivalent to above:
698             $pl->stripplots($x, [$y1, $y2, $y3, $y4],
699             PLOTTYPE => 'LINE', TITLE => 'functions',
700             YLAB => ['x**2', 'sqrt(x)', 'x**3', 'sin(x/20*2pi)'],
701             COLOR => ['GREEN', 'DEEPSKYBLUE', 'DARKORCHID1', 'DEEPPINK'], XLAB => 'X label');
702              
703             # Here's something a bit different. Notice that different xs have
704             # different lengths.
705             $x1 = sequence(20);
706             $y1 = $x1**2;
707              
708             $x2 = sequence(18);
709             $y2 = sqrt($x2);
710              
711             $x3 = sequence(24);
712             $y3 = $x3**3;
713              
714             my $x4 = sequence(27);
715             $a = ($x4/20) * 2 * $pi;
716             my $y4 = sin($a);
717              
718             $xs = [$x1, $x2, $x3, $x4];
719             $ys = [$y1, $y2, $y3, $y4];
720             $pl->stripplots($xs, $ys, PLOTTYPE => 'LINE', TITLE => 'functions',
721             YLAB => ['x**2', 'sqrt(x)', 'x**3', 'sin(x/20*2pi)'],
722             COLOR => ['GREEN', 'DEEPSKYBLUE', 'DARKORCHID1', 'DEEPPINK'], XLAB => 'X label');
723              
724             In addition, COLOR may be specified as a reference to a list of colors. If
725             this is done, the colors are applied separately to each plot.
726              
727             Also, the options Y_BASE and Y_GUTTER can be specified. Y_BASE gives the Y offset
728             of the bottom of the lowest plot (0-1, specified like a VIEWPORT, defaults to 0.1) and Y_GUTTER
729             gives the gap between the graphs (0-1, default = 0.02).
730              
731             =head2 colorkey
732              
733             =for ref
734              
735             Plot a color key showing which color represents which value
736              
737             =for usage
738              
739             Arguments:
740             $range : A PDL which tells the range of the color values
741             $orientation : 'v' for vertical color key, 'h' for horizontal
742              
743             Supported options:
744             All options except:
745              
746             BACKGROUND
747             DEV
748             FILE
749             FRAMECOLOR
750             JUST
751             PAGESIZE
752             SUBPAGES
753              
754             (These must be set in call to 'new'.)
755              
756             =for example
757              
758             # Plot X vs. Y with Z shown by the color. Then plot
759             # vertical key to the right of the original plot.
760             $pl->xyplot ($x, $y, PALETTE => 'RAINBOW', PLOTTYPE => 'POINTS', COLORMAP => $z);
761             $pl->colorkey ($z, 'v', VIEWPORT => [0.93, 0.96, 0.15, 0.85]);
762              
763             =head2 shadeplot
764              
765             =for ref
766              
767             Create a shaded contour plot of 2D PDL 'z' with 'nsteps' contour levels.
768             Linear scaling is used to map the coordinates of Z(X, Y) to world coordinates
769             via the L option.
770              
771             =for usage
772              
773             Arguments:
774             $z : A 2D PDL which contains surface values at each XY coordinate.
775             $nsteps : The number of contour levels requested for the plot.
776              
777             Supported options:
778             All options except:
779              
780             BACKGROUND
781             DEV
782             FILE
783             FRAMECOLOR
784             JUST
785             PAGESIZE
786             SUBPAGES
787              
788             (These must be set in call to 'new'.)
789              
790             =for example
791              
792             # vertical key to the right of the original plot.
793             # The BOX must be specified to give real coordinate values to the $z array.
794             $pl->shadeplot ($z, $nsteps, BOX => [-1, 1, -1, 1], PALETTE => 'RAINBOW', ZRANGE => [0,100]);
795             $pl->colorkey ($z, 'v', VIEWPORT => [0.93, 0.96, 0.15, 0.85], ZRANGE => [0,100]);
796              
797             =head2 histogram
798              
799             =for ref
800              
801             Create a histogram of a 1-D variable.
802              
803             =for usage
804              
805             Arguments:
806             $x : A 1D PDL
807             $nbins : The number of bins to use in the histogram.
808              
809             Supported options:
810             All options except:
811              
812             BACKGROUND
813             DEV
814             FILE
815             FRAMECOLOR
816             JUST
817             PAGESIZE
818             SUBPAGES
819              
820             (These must be set in call to 'new'.)
821              
822             =for example
823              
824             $pl->histogram ($x, $nbins, BOX => [$min, $max, 0, 100]);
825              
826             =head2 histogram1
827              
828             =for ref
829              
830             Create a histogram of a 1-D variable. This alternative to 'histogram'
831             creates filled boxes and also handles Y-axis scaling better.
832              
833             =for usage
834              
835             Arguments:
836             $x : A 1D PDL
837             $nbins : The number of bins to use in the histogram.
838              
839             Supported options:
840             All options except:
841              
842             BACKGROUND
843             DEV
844             FILE
845             FRAMECOLOR
846             JUST
847             PAGESIZE
848             SUBPAGES
849              
850             (These must be set in call to 'new'.)
851              
852             =for example
853              
854             $pl->histogram1 ($x, $nbins, COLOR => 'GREEN');
855              
856             =head2 bargraph
857              
858             =for ref
859              
860             Simple utility to plot a bar chart with labels on the X axis.
861             The usual options can be specified, plus one other: MAXBARLABELS
862             specifies the maximum number of labels to allow on the X axis.
863             The default is 20. If this value is exceeded, then every other
864             label is plotted. If twice MAXBARLABELS is exceeded, then only
865             every third label is printed, and so on.
866              
867             if UNFILLED_BARS is set to true, then plot the bars as outlines
868             and not as filled rectangles.
869              
870             A stacked bar graph can be created if the STACKED_BAR_COLORS
871             option is set. The option takes a reference to a perl list of
872             color names or RGB triplets. If this option is set, then $x should
873             not be a 1-D PDL of N bar heights, but a 2D PDL of NxM where N is the
874             number of bars and M is the number of colors in STACKED_BAR_COLORS.
875              
876             =for usage
877              
878             Arguments:
879             $labels -- A reference to a perl list of strings.
880             $values -- A PDL of values to be plotted.
881              
882             Supported options:
883             All options except:
884              
885             BACKGROUND
886             DEV
887             FILE
888             FRAMECOLOR
889             JUST
890             PAGESIZE
891             SUBPAGES
892              
893             (These must be set in call to 'new'.)
894              
895             =for example
896              
897             $labels = ['one', 'two', 'three'];
898             $values = pdl(1, 2, 3);
899              
900             # Note if TEXTPOSITION is specified, it must be in 4 argument mode (border mode):
901             # [$side, $disp, $pos, $just]
902             #
903             # Where side = 't', 'b', 'l', or 'r' for top, bottom, left and right
904             # 'tv', 'bv', 'lv' or 'rv' for top, bottom, left or right perpendicular to the axis.
905             #
906             # disp is the number of character heights out from the edge
907             # pos is the position along the edge of the viewport, from 0 to 1.
908             # just tells where the reference point of the string is: 0 = left, 1 = right, 0.5 = center.
909             #
910             # The '$pos' entry will be ignored (computed by the bargraph routine)
911             $pl->bargraph($labels, $values, MAXBARLABELS => 30, TEXTPOSITION => ['bv', 0.5, 1.0, 1.0]);
912              
913             # A stacked bar chart:
914             $labels = ['label1', 'label2', 'label3'];
915             $values = pdl([[50,40,60], # green bars
916             [20,10,30]]); # purple ([128, 0, 56]) bars
917             $pl->bargraph ($labels, $values, STACKED_BAR_COLORS => ['GREEN', [128, 0, 56]])
918              
919             =head2 text
920              
921             =for ref
922              
923             Write text on a plot. Text can either be written
924             with respect to the borders or at an arbitrary location and angle
925             (see the L entry).
926              
927             =for usage
928              
929             Arguments:
930             $t : The text.
931              
932             Supported options:
933             All options except:
934              
935             BACKGROUND
936             DEV
937             FILE
938             FRAMECOLOR
939             JUST
940             PAGESIZE
941             SUBPAGES
942              
943             (These must be set in call to 'new'.)
944              
945             =for example
946              
947             $pl->text("Count", COLOR => 'PINK',
948             TEXTPOSITION => ['t', 3, 0.5, 0.5]); # top, 3 units out, string ref. pt in
949             # center of string, middle of axis
950              
951             =head2 close
952              
953             =for ref
954              
955             Close a PLplot object, writing out the file and cleaning up.
956              
957             =for usage
958              
959             Arguments:
960             None
961              
962             Returns:
963             Nothing
964              
965             This closing of the PLplot object can be done explicitly though the
966             'close' method. Alternatively, a DESTROY block does an automatic
967             close whenever the PLplot object passes out of scope.
968              
969             =for example
970              
971             $pl->close;
972              
973             =cut
974              
975             # Colors (from rgb.txt) are stored as RGB triples
976             # with each value from 0-255
977             sub cc2t { [map {hex} split ' ', shift] }
978             our %_constants = (
979             BLACK => [ 0, 0, 0],
980             RED => [240, 50, 50],
981             YELLOW => [255,255, 0],
982             GREEN => [ 0,255, 0],
983             AQUAMARINE => [127,255,212],
984             PINK => [255,192,203],
985             WHEAT => [245,222,179],
986             GREY => [190,190,190],
987             BROWN => [165, 42, 42],
988             BLUE => [ 0, 0,255],
989             BLUEVIOLET => [138, 43,226],
990             CYAN => [ 0,255,255],
991             TURQUOISE => [ 64,224,208],
992             MAGENTA => [255, 0,255],
993             SALMON => [250,128,114],
994             WHITE => [255,255,255],
995             ROYALBLUE => cc2t('2B 60 DE'),
996             DEEPSKYBLUE => cc2t('3B B9 FF'),
997             VIOLET => cc2t('8D 38 C9'),
998             STEELBLUE1 => cc2t('5C B3 FF'),
999             DEEPPINK => cc2t('F5 28 87'),
1000             MAGENTA => cc2t('FF 00 FF'),
1001             DARKORCHID1 => cc2t('B0 41 FF'),
1002             PALEVIOLETRED2 => cc2t('E5 6E 94'),
1003             TURQUOISE1 => cc2t('52 F3 FF'),
1004             LIGHTSEAGREEN => cc2t('3E A9 9F'),
1005             SKYBLUE => cc2t('66 98 FF'),
1006             FORESTGREEN => cc2t('4E 92 58'),
1007             CHARTREUSE3 => cc2t('6C C4 17'),
1008             GOLD2 => cc2t('EA C1 17'),
1009             SIENNA1 => cc2t('F8 74 31'),
1010             CORAL => cc2t('F7 65 41'),
1011             HOTPINK => cc2t('F6 60 AB'),
1012             LIGHTCORAL => cc2t('E7 74 71'),
1013             LIGHTPINK1 => cc2t('F9 A7 B0'),
1014             LIGHTGOLDENROD => cc2t('EC D8 72'),
1015             );
1016              
1017             # a hash of subroutines to invoke when certain keywords are specified
1018             # These are called with arg(0) = $self (the plot object)
1019             # and arg(1) = value specified for keyword
1020             our %_actions =
1021             (
1022              
1023             # Set color for index 0, the plot background
1024             BACKGROUND => sub {
1025             my $self = shift;
1026             my $color = _color(shift);
1027             $self->{COLORS}[0] = $color;
1028             plscolbg (@$color);
1029             },
1030              
1031             # set plotting box in world coordinates
1032             BOX => sub {
1033             my $self = shift;
1034             my $box = shift;
1035             die "Box must be a ref to a four element array" unless (ref($box) =~ /ARRAY/ and @$box == 4);
1036             $self->{BOX} = $box;
1037             },
1038              
1039             CHARSIZE => sub { my $self = shift;
1040             $self->{CHARSIZE} = $_[0];
1041             plschr (0, $self->{CHARSIZE}) unless ($self->{ISNEW}); # do not call plsch from the 'new' routine.
1042             },
1043              
1044             # maintain color map, set to specified rgb triple
1045             COLOR => sub {
1046             my $self = shift;
1047             my $color = _color(shift);
1048              
1049             # init.
1050             $self->{COLORS} = [] unless exists($self->{COLORS});
1051              
1052             my @idx = @{$self->{COLORS}}; # map of color index (0-15) to RGB triples
1053             my $found = 0;
1054             for (my $i=2;$i<@idx;$i++) { # map entries 0 and 1 are reserved for BACKGROUND and FRAMECOLOR
1055             if (_coloreq ($color, $idx[$i])) {
1056             $self->{CURRENT_COLOR_IDX} = $i;
1057             $found = 1;
1058             plscol0 ($self->{CURRENT_COLOR_IDX}, @$color);
1059             }
1060             }
1061             return if ($found);
1062              
1063             die "Too many colors used! (max 15)" if (@{$self->{COLORS}} > 14);
1064              
1065             # add this color as index 2 or greater (entries 0 and 1 reserved)
1066             my $idx = (@{$self->{COLORS}} > 1) ? @{$self->{COLORS}} : 2;
1067             $self->{COLORS}[$idx] = $color;
1068             $self->{CURRENT_COLOR_IDX} = $idx;
1069             plscol0 ($self->{CURRENT_COLOR_IDX}, @$color);
1070             },
1071              
1072             # Contour plot label parameters (see setcontlabelparam and setcontlabelformat)
1073             CONTOURLABELS => sub { my $self = shift;
1074             my $parms = shift; # [offset, size, spacing, lexp, sigdig], or 0 (deactivate) or 1 (activate)
1075             my $defaults = [0.006, 0.3, 0.1, 4, 2];
1076             if ( (ref($parms) =~ /ARRAY/) && (@$parms == 5) ) {
1077             $self->{CONTOURLABELS} = $parms;
1078             } elsif ($parms == 0) {
1079             $self->{CONTOURLABELS} = 0;
1080             } elsif ($parms == 1) {
1081             $self->{CONTOURLABELS} = $defaults;
1082             } else {
1083             die
1084             "Illegal contour label parameters: Must either be 0 (turn off contour labels), 1 (turn on default contour labels)
1085             or a five element array:
1086             offset: Offset of label from contour line (if set to 0.0, labels are printed on the lines). Default value is 0.006.
1087             size: Font height for contour labels (normalized). Default value is 0.3.
1088             spacing: Spacing parameter for contour labels. Default value is 0.1.
1089             lexp: If the contour numerical label is greater than 10^(lexp) or less than 10^(-lexp),
1090             then the exponential format is used. Default value of lexp is 4.
1091             sigdig: Number of significant digits. Default value is 2";
1092             }
1093             },
1094              
1095             # set output device type
1096             DEV => sub { my $self = shift;
1097             my $dev = shift;
1098             $self->{DEV} = $dev;
1099             plsdev ($dev)
1100             }, # this must be specified with call to new!
1101              
1102             # set PDL to plot into (alternative to specifying DEV)
1103             MEM => sub { my $self = shift;
1104             my $pdl = shift;
1105             my $x = $pdl->getdim(1);
1106             my $y = $pdl->getdim(2);
1107             plsmem ($x, $y, $pdl);
1108             },
1109              
1110             # set output file
1111             FILE => sub { plsfnam ($_[1]) }, # this must be specified with call to new!
1112              
1113             # set color for index 1, the plot frame and text
1114             # set color index 1, the frame color
1115             FRAMECOLOR => sub {
1116             my $self = shift;
1117             my $color = _color(shift);
1118             $self->{COLORS}[1] = $color;
1119             plscol0 (1, @$color);
1120             },
1121              
1122             GRIDMAP => sub {
1123             # Use a user-defined grid map if requested. This is an X and Y vector that
1124             # tells what are the world coordinates for each pixel in $z
1125             # It is used in 'shadeplot'.
1126             my $self = shift;
1127             my $map = shift;
1128             die "GRIDMAP must be an array reference" if (ref($map) !~ /ARRAY/);
1129             die "GRIDMAP must be a two element array reference" if (@$map != 2);
1130             die "GRIDMAP must contain two PDLs" if ( (ref($$map[0]) !~ /PDL/) || (ref($$map[1]) !~ /PDL/) );
1131             die "GRIDMAP must contain two 1D PDLs" if ( ($$map[0]->dims != 1) || ($$map[1]->dims != 1) );
1132             $self->{GRIDMAP} = $map;
1133             },
1134              
1135             GRIDMAP2 => sub {
1136             # Use a user-defined grid map if requested. These are an X and Y matrices that
1137             # tells what are the world coordinates for each pixel in $z
1138             # They are used in 'shadeplot'.
1139             my $self = shift;
1140             my $map = shift;
1141             die "GRIDMAP2 must be an array reference" if (ref($map) !~ /ARRAY/);
1142             die "GRIDMAP2 must be a two element array reference" if (@$map != 2);
1143             die "GRIDMAP2 must contain two PDLs" if ( (ref($$map[0]) !~ /PDL/) || (ref($$map[1]) !~ /PDL/) );
1144             die "GRIDMAP2 must contain two 2D PDLs" if ( ($$map[0]->dims != 2) || ($$map[1]->dims != 2) );
1145             $self->{GRIDMAP2} = $map;
1146             },
1147              
1148             # Set flag for equal scale axes
1149             JUST => sub {
1150             my $self = shift;
1151             my $just = shift;
1152             die "JUST must be 0 or 1 (defaults to 0)" unless ($just == 0 or $just == 1);
1153             $self->{JUST} = $just;
1154             },
1155              
1156             LINEWIDTH => sub {
1157             my $self = shift;
1158             my $wid = shift;
1159             die "LINEWIDTH must range from 0 to LARGE8" unless ($wid >= 0);
1160             $self->{LINEWIDTH} = $wid;
1161             },
1162              
1163             LINESTYLE => sub {
1164             my $self = shift;
1165             my $sty = shift;
1166             die "LINESTYLE must range from 1 to 8" unless ($sty >= 1 and $sty <= 8);
1167             $self->{LINESTYLE} = $sty;
1168             },
1169              
1170             MAJTICKSIZE => sub {
1171             my $self = shift;
1172             my $val = shift;
1173             die "MAJTICKSIZE must be greater than or equal to zero"
1174             unless ($val >= 0);
1175             plsmaj (0, $val);
1176             },
1177              
1178             MINTICKSIZE => sub {
1179             my $self = shift;
1180             my $val = shift;
1181             die "MINTICKSIZE must be greater than or equal to zero"
1182             unless ($val >= 0);
1183             plsmin (0, $val);
1184             },
1185              
1186             NXSUB => sub {
1187             my $self = shift;
1188             my $val = shift;
1189             die "NXSUB must be an integer greater than or equal to zero"
1190             unless ($val >= 0 and int($val) == $val);
1191             $self->{NXSUB} = $val;
1192             },
1193              
1194             NYSUB => sub {
1195             my $self = shift;
1196             my $val = shift;
1197             die "NYSUB must be an integer greater than or equal to zero"
1198             unless ($val >= 0 and int($val) == $val);
1199             $self->{NYSUB} = $val;
1200             },
1201              
1202             # set driver options, example for ps driver, {text => 1} is accepted
1203             OPTS => sub {
1204             my $self = shift;
1205             my $opts = shift;
1206              
1207             foreach my $opt (keys %$opts) {
1208             plsetopt ($opt, $$opts{$opt});
1209             }
1210             },
1211              
1212             # set driver options, example for ps driver, {text => 1} is accepted
1213             ORIENTATION => sub {
1214             my $self = shift;
1215             my $orient = shift;
1216              
1217             die "Orientation must be between 0 and 4" unless ($orient >= 0 and $orient <= 4);
1218             $self->{ORIENTATION} = $orient;
1219             },
1220              
1221             PAGESIZE =>
1222             # set plot size in mm. Only useful in call to 'new'
1223             sub {
1224             my $self = shift;
1225             my $dims = shift;
1226              
1227             die "plot size must be a 2 element array ref: X size in pixels, Y size in pixels"
1228             if ((ref($dims) !~ /ARRAY/) || @$dims != 2);
1229             $self->{PAGESIZE} = $dims;
1230             },
1231              
1232             # load some pre-done color map 1 setups
1233             PALETTE => sub {
1234             my $self = shift;
1235             my $pal = shift;
1236              
1237             my %legal = (REVERSERAINBOW => 1, REVERSEGREYSCALE => 1, REDGREEN => 1, RAINBOW => 1, GREYSCALE => 1, GREENRED => 1);
1238             if ($legal{$pal}) {
1239             $self->{PALETTE} = $pal;
1240             if ($pal eq 'RAINBOW') {
1241             plscmap1l (0, PDL->new(0,1), PDL->new(0,300), PDL->new(0.5, 0.5), PDL->new(1,1), PDL->new(0,0));
1242             } elsif ($pal eq 'REVERSERAINBOW') {
1243             plscmap1l (0, PDL->new(0,1), PDL->new(270,-30), PDL->new(0.5, 0.5), PDL->new(1,1), PDL->new(0,0));
1244             } elsif ($pal eq 'GREYSCALE') {
1245             plscmap1l (0, PDL->new(0,1), PDL->new(0,0), PDL->new(0,1), PDL->new(0,0), PDL->new(0,0));
1246             } elsif ($pal eq 'REVERSEGREYSCALE') {
1247             plscmap1l (0, PDL->new(0,1), PDL->new(0,0), PDL->new(1,0), PDL->new(0,0), PDL->new(0,0));
1248             } elsif ($pal eq 'GREENRED') {
1249             plscmap1l (0, PDL->new(0,1), PDL->new(120,0), PDL->new(0.5, 0.5), PDL->new(1,1), PDL->new(1,1));
1250             } elsif ($pal eq 'REDGREEN') {
1251             plscmap1l (0, PDL->new(0,1), PDL->new(0,120), PDL->new(0.5, 0.5), PDL->new(1,1), PDL->new(1,1));
1252             }
1253             } else {
1254             die "Illegal palette name. Legal names are: " . join (" ", keys %legal);
1255             }
1256             },
1257              
1258             # specify plot type (LINE, POINTS, LINEPOINTS, CONTOUR, SHADE)
1259             PLOTTYPE => sub {
1260             my $self = shift;
1261             my $val = shift;
1262              
1263             my %legal = (LINE => 1, POINTS => 1, LINEPOINTS => 1, CONTOUR => 1, SHADE => 1);
1264             if ($legal{$val}) {
1265             $self->{PLOTTYPE} = $val;
1266             } else {
1267             die "Illegal plot type. Legal options are: " . join (" ", keys %legal);
1268             }
1269             },
1270              
1271             # Specify outline bars for bargraph
1272             STACKED_BAR_COLORS => sub {
1273             my $self = shift;
1274             my $val = shift;
1275             my $err = "STACKED_BAR_COLORS must be a reference to a perl list of color names or RGB triples";
1276             die $err if (ref($val) !~ /ARRAY/);
1277             delete $self->{STACKED_BAR_COLORS};
1278             foreach my $e (@$val) {
1279             push @{$self->{STACKED_BAR_COLORS}}, _color($e); # Will throw an exception if this is not a legal color
1280             }
1281             },
1282              
1283             # specify which subpage to plot on 1-N or 0 (meaning 'next')
1284             SUBPAGE => sub {
1285             my $self = shift;
1286             my $val = shift;
1287             my $err = "SUBPAGE = \$npage where \$npage = 1-N or 0 (for 'next subpage')";
1288             if ($val >= 0) {
1289             $self->{SUBPAGE} = $val;
1290             } else {
1291             die $err;
1292             }
1293             },
1294              
1295             # specify number of sub pages [nx, ny]
1296             SUBPAGES => sub {
1297             my $self = shift;
1298             my $val = shift;
1299             my $err = "SUBPAGES = [\$nx, \$ny] where \$nx and \$ny are between 1 and 127";
1300             if (ref($val) =~ /ARRAY/ and @$val == 2) {
1301             my ($nx, $ny) = @$val;
1302             if ($nx > 0 and $nx < 128 and $ny > 0 and $ny < 128) {
1303             $self->{SUBPAGES} = [$nx, $ny];
1304             } else {
1305             die $err;
1306             }
1307             } else {
1308             die $err;
1309             }
1310             },
1311              
1312             # specify type of symbol to plot
1313             SYMBOL => sub {
1314             my $self = shift;
1315             my $val = shift;
1316              
1317             if ($val >= 0 && $val < 3000) {
1318             $self->{SYMBOL} = $val;
1319             } else {
1320             die "Illegal symbol number. Legal symbols are between 0 and 3000";
1321             }
1322             },
1323              
1324             SYMBOLSIZE => sub {
1325             my ($self, $size) = @_;
1326             die "symbol size must be a real number from 0 to (large)" unless ($size >= 0);
1327             $self->{SYMBOLSIZE} = $size;
1328             },
1329              
1330             # specify placement of text. Either relative to border, specified as:
1331             # [$side, $disp, $pos, $just]
1332             # or
1333             # inside plot window, specified as:
1334             # [$x, $y, $dx, $dy, $just] (see POD doc for details)
1335             TEXTPOSITION => sub {
1336             my $self = shift;
1337             my $val = shift;
1338             die "TEXTPOSITION value must be an array ref with either:
1339             [$side, $disp, $pos, $just] or [$x, $y, $dx, $dy, $just]"
1340             unless ((ref($val) =~ /ARRAY/) and ((@$val == 4) || (@$val == 5)));
1341             if (@$val == 4) {
1342             $self->{TEXTMODE} = 'border';
1343             } else {
1344             $self->{TEXTMODE} = 'plot';
1345             }
1346             $self->{TEXTPOSITION} = $val;
1347             },
1348              
1349             # draw a title for the graph
1350             TITLE => sub {
1351             my $self = shift;
1352             my $text = shift;
1353             $self->{TITLE} = $text;
1354             },
1355              
1356             # Specify outline bars for bargraph
1357             UNFILLED_BARS => sub {
1358             my $self = shift;
1359             my $val = shift;
1360             $self->{UNFILLED_BARS} = $val;
1361             },
1362              
1363             # set the location of the plotting window on the page
1364             VIEWPORT => sub {
1365             my $self = shift;
1366             my $vp = shift;
1367             die "Viewport must be a ref to a four element array"
1368             unless (ref($vp) =~ /ARRAY/ and @$vp == 4);
1369             $self->{VIEWPORT} = $vp;
1370             },
1371              
1372             # set X axis label options. See pod for definitions.
1373             XBOX => sub {
1374             my $self = shift;
1375             my $opts = lc shift;
1376             my @opts = split '', $opts;
1377             map { 'abcdfghilmnst' =~ /$_/i || die "Illegal option $_. Only abcdfghilmnst permitted" } @opts;
1378             $self->{XBOX} = $opts;
1379             },
1380              
1381             # draw an X axis label for the graph
1382             XLAB => sub {
1383             my $self = shift;
1384             my $text = shift;
1385             $self->{XLAB} = $text;
1386             },
1387              
1388             XTICK => sub {
1389             my $self = shift;
1390             my $val = shift;
1391             die "XTICK must be greater than or equal to zero"
1392             unless ($val >= 0);
1393             $self->{XTICK} = $val;
1394             },
1395              
1396             # set Y axis label options. See pod for definitions.
1397             YBOX => sub {
1398             my $self = shift;
1399             my $opts = shift;
1400             my @opts = split '', $opts;
1401             map { 'abcfghilmnstv' =~ /$_/i || die "Illegal option $_. Only abcfghilmnstv permitted" } @opts;
1402             $self->{YBOX} = $opts;
1403             },
1404              
1405             # draw an Y axis label for the graph
1406             YLAB => sub {
1407             my $self = shift;
1408             my $text = shift;
1409             $self->{YLAB} = $text;
1410             },
1411              
1412             YTICK => sub {
1413             my $self = shift;
1414             my $val = shift;
1415             die "YTICK must be greater than or equal to zero"
1416             unless ($val >= 0);
1417             $self->{YTICK} = $val;
1418             },
1419              
1420             ZRANGE => sub {
1421             my $self = shift;
1422             my $val = shift;
1423             die "ZRANGE must be a perl array ref with min and max Z values"
1424             unless (ref($val) =~ /ARRAY/ && @$val == 2);
1425             $self->{ZRANGE} = $val;
1426             },
1427              
1428             );
1429              
1430             #
1431             ## Internal utility routines
1432             #
1433              
1434             # handle color as string in _constants hash or [r,g,b] triple
1435             # Input: either color name or [r,g,b] array ref
1436             # Output: [r,g,b] array ref or exception
1437             sub _color {
1438             my $c = shift;
1439             if (ref($c) =~ /ARRAY/) {
1440             return $c;
1441             } elsif ($c = $_constants{$c}) {
1442             return $c;
1443             } else {
1444             die "Color $c not defined";
1445             }
1446             }
1447              
1448             # return 1 if input [r,g,b] triples are equal.
1449             sub _coloreq {
1450             my ($a, $b) = @_;
1451             for (my $i=0;$i<3;$i++) { return 0 if ($$a[$i] != $$b[$i]); }
1452             return 1;
1453             }
1454              
1455             # Initialize plotting window given the world coordinate box and
1456             # a 'justify' flag (for equal axis scales).
1457             sub _setwindow {
1458              
1459             my $self = shift;
1460              
1461             # choose correct subwindow
1462             pladv ($self->{SUBPAGE}) if (exists ($self->{SUBPAGE}));
1463             delete ($self->{SUBPAGE}); # get rid of SUBPAGE so future plots will stay on same
1464             # page unless user asks for specific page
1465              
1466             my $box = $self->{BOX} || [0,1,0,1]; # default window
1467              
1468             sub MAX { ($_[0] > $_[1]) ? $_[0] : $_[1]; }
1469              
1470             # get subpage offsets from page left/bottom of image
1471             my ($spxmin, $spxmax, $spymin, $spymax) = (PDL->new(0),PDL->new(0),PDL->new(0),PDL->new(0));
1472             plgspa($spxmin, $spxmax, $spymin, $spymax);
1473             $spxmin = $spxmin->at(0);
1474             $spxmax = $spxmax->at(0);
1475             $spymin = $spymin->at(0);
1476             $spymax = $spymax->at(0);
1477             my $xsize = $spxmax - $spxmin;
1478             my $ysize = $spymax - $spymin;
1479              
1480             my @vp = @{$self->{VIEWPORT}}; # view port xmin, xmax, ymin, ymax in fraction of image size
1481              
1482             # if JUSTify is zero, set to the user specified (or default) VIEWPORT
1483             if ($self->{JUST} == 0) {
1484             plvpor(@vp);
1485              
1486             # compute viewport to allow the same scales for both axes
1487             } else {
1488             my $p_def = PDL->new(0);
1489             my $p_ht = PDL->new(0);
1490             plgchr ($p_def, $p_ht);
1491             $p_def = $p_def->at(0);
1492             my $lb = 8.0 * $p_def;
1493             my $rb = 5.0 * $p_def;
1494             my $tb = 5.0 * $p_def;
1495             my $bb = 5.0 * $p_def;
1496             my $dx = $$box[1] - $$box[0];
1497             my $dy = $$box[3] - $$box[2];
1498             my $xscale = $dx / ($xsize - $lb - $rb);
1499             my $yscale = $dy / ($ysize - $tb - $bb);
1500             my $scale = MAX($xscale, $yscale);
1501             my $vpxmin = MAX($lb, 0.5 * ($xsize - $dx / $scale));
1502             my $vpxmax = $vpxmin + ($dx / $scale);
1503             my $vpymin = MAX($bb, 0.5 * ($ysize - $dy / $scale));
1504             my $vpymax = $vpymin + ($dy / $scale);
1505             plsvpa($vpxmin, $vpxmax, $vpymin, $vpymax);
1506             $self->{VIEWPORT} = [$vpxmin/$xsize, $vpxmax/$xsize, $vpymin/$ysize, $vpymax/$ysize];
1507             }
1508              
1509             # set up world coords in window
1510             plwind (@$box);
1511              
1512             }
1513              
1514             # Add title and axis labels.
1515             sub _drawlabels {
1516              
1517             my $self = shift;
1518              
1519             plcol0 (1); # set to frame color
1520             plmtex (2.5, 0.5, 0.5, 't', $self->{TITLE}) if ($self->{TITLE});
1521             plmtex (3.0, 0.5, 0.5, 'b', $self->{XLAB}) if ($self->{XLAB});
1522             plmtex (3.5, 0.5, 0.5, 'l', $self->{YLAB}) if ($self->{YLAB});
1523             plcol0 ($self->{CURRENT_COLOR_IDX}); # set back
1524              
1525             }
1526              
1527             #
1528             ## user-visible routines
1529             #
1530              
1531             # Pool of PLplot stream numbers. One of these stream numbers is taken when 'new' is called
1532             # and when the corresponding 'close' is called, it is returned to the pool. The pool is
1533             # just a queue: 'new' shifts stream numbers from the top of the queue, 'close' pushes them
1534             # back on the bottom of the queue.
1535             my @plplot_stream_pool = (0..99);
1536              
1537             # This routine starts out a plot. Generally one specifies
1538             # DEV and FILE (device and output file name) as options.
1539             sub new {
1540             my $type = shift;
1541             my $self = {};
1542              
1543             # set up object
1544             $self->{PLOTTYPE} = 'LINE';
1545             # $self->{CURRENT_COLOR_IDX} = 1;
1546             $self->{COLORS} = [];
1547              
1548             bless $self, $type;
1549              
1550             # set stream number first
1551             $self->{STREAMNUMBER} = shift @plplot_stream_pool;
1552             die "No more PLplot streams left, too many open PLplot objects!" if (!defined($self->{STREAMNUMBER}));
1553             plsstrm($self->{STREAMNUMBER});
1554              
1555             # set background and frame color first
1556             $self->setparm(BACKGROUND => 'WHITE',
1557             FRAMECOLOR => 'BLACK');
1558              
1559             # set defaults, allow input options to override
1560             my %opts = (
1561             COLOR => 'BLACK',
1562             XBOX => 'BCNST',
1563             YBOX => 'BCNST',
1564             JUST => 0,
1565             SUBPAGES => [1,1],
1566             VIEWPORT => [0.1, 0.87, 0.13, 0.82],
1567             SUBPAGE => 0,
1568             PAGESIZE => [600, 500],
1569             LINESTYLE => 1,
1570             LINEWIDTH => 0,
1571             SYMBOL => 751, # a small square
1572             NXSUB => 0,
1573             NYSUB => 0,
1574             ORIENTATION=> 0,
1575             XTICK => 0,
1576             YTICK => 0,
1577             CHARSIZE => 1,
1578             @_);
1579              
1580             # apply options
1581             $self->{ISNEW} = 1;
1582             $self->setparm(%opts);
1583             $self->{ISNEW} = 0;
1584              
1585             # Do initial setup
1586             plspage (0, 0, @{$self->{PAGESIZE}}, 0, 0) if (defined($self->{PAGESIZE}));
1587             plssub (@{$self->{SUBPAGES}});
1588             plsfam (0, -1, -1); # fix for plplot 5.11.0
1589             plfontld (1); # extented symbol pages
1590             plscmap0n (16); # set up color map 0 to 16 colors. Is this needed?
1591             plscmap1n (128); # set map 1 to 128 colors (should work for devices with 256 colors)
1592             plinit ();
1593              
1594             # Now (as of plplot5.11) this must be done after plinit();
1595             plschr (0, $self->{CHARSIZE});
1596              
1597             # set page orientation
1598             plsdiori ($self->{ORIENTATION});
1599              
1600             # set up plotting box
1601             $self->_setwindow;
1602              
1603             return $self;
1604             }
1605              
1606             # set parameters. Called from user directly or from other routines.
1607             sub setparm {
1608             my $self = shift;
1609              
1610             my %opts = @_;
1611              
1612             # Set PLplot to right output stream
1613             plsstrm($self->{STREAMNUMBER});
1614              
1615             # apply all options
1616             OPTION:
1617             foreach my $o (keys %opts) {
1618             unless (exists($_actions{$o})) {
1619             warn "Illegal option $o, ignoring";
1620             next OPTION;
1621             }
1622             &{$_actions{$o}}($self, $opts{$o});
1623             }
1624             }
1625              
1626             # handle 2D plots
1627             sub xyplot {
1628             my $self = shift;
1629             my $x = shift;
1630             my $y = shift;
1631              
1632             my %opts = @_;
1633              
1634             # Set PLplot to right output stream
1635             plsstrm($self->{STREAMNUMBER});
1636              
1637             # only process COLORMAP entries once
1638             my $z = $opts{COLORMAP};
1639             delete ($opts{COLORMAP});
1640              
1641             # handle ERRORBAR options
1642             my $xeb = $opts{XERRORBAR};
1643             my $yeb = $opts{YERRORBAR};
1644             delete ($opts{XERRORBAR});
1645             delete ($opts{YERRORBAR});
1646              
1647             # apply options
1648             $self->setparm(%opts);
1649              
1650             unless (exists($self->{BOX})) {
1651             $self->{BOX} = [$x->minmax, $y->minmax];
1652             }
1653              
1654             # set up viewport, subpage, world coordinates
1655             $self->_setwindow;
1656              
1657             # draw labels
1658             $self->_drawlabels;
1659              
1660             # plot box
1661             plcol0 (1); # set to frame color
1662             plbox ($self->{XTICK}, $self->{NXSUB}, $self->{YTICK}, $self->{NYSUB},
1663             $self->{XBOX}, $self->{YBOX}); # !!! note out of order call
1664              
1665             # set the color according to the color specified in the object
1666             # (we don't do this as an option, because then the frame might
1667             # get the color requested for the line/points
1668             plcol0 ($self->{CURRENT_COLOR_IDX});
1669              
1670             # set line style for plot only (not box)
1671             pllsty ($self->{LINESTYLE});
1672              
1673             # set line width for plot only (not box)
1674             plwidth ($self->{LINEWIDTH});
1675              
1676             # Plot lines if requested
1677             if ($self->{PLOTTYPE} =~ /LINE/) {
1678             plline ($x, $y);
1679             }
1680              
1681             # set line width back
1682             plwidth (0);
1683              
1684             # plot points if requested
1685             if ($self->{PLOTTYPE} =~ /POINTS/) {
1686             my $c = $self->{SYMBOL};
1687             unless (defined($c)) {
1688              
1689             # the default for $c is a PDL of ones with shape
1690             # equal to $x with the first dimension removed
1691             my $z = PDL->zeroes($x->nelem);
1692             $c = PDL->ones($z->zcover) unless defined($c);
1693             }
1694             plssym (0, $self->{SYMBOLSIZE}) if (defined($self->{SYMBOLSIZE}));
1695              
1696             if (defined($z)) { # if a color range plot requested
1697             my ($min, $max) = exists ($self->{ZRANGE}) ? @{$self->{ZRANGE}} : $z->minmax;
1698             plcolorpoints ($x, $y, $z, $c, $min, $max);
1699             } else {
1700             plsym ($x, $y, $c);
1701             }
1702             }
1703              
1704             # Plot error bars, if requested
1705             if (defined($xeb)) {
1706             # horizontal (X) error bars
1707             plerrx ($x->nelem, $x - $xeb/2, $x + $xeb/2, $y);
1708             }
1709              
1710             if (defined($yeb)) {
1711             # vertical (Y) error bars
1712             plerry ($y->nelem, $x, $y - $yeb/2, $y + $yeb/2);
1713             }
1714              
1715             # Flush the PLplot stream.
1716             plflush();
1717             }
1718              
1719             sub stripplots {
1720              
1721             my $self = shift;
1722             my $xs = shift;
1723             my $yargs = shift;
1724              
1725             my %opts = @_;
1726              
1727             # NYTICK => number of y axis ticks
1728             my $nytick = $opts{NYTICK} || 2;
1729             delete ($opts{NYTICK});
1730              
1731             # only process COLORMAP entries once
1732             my $zs = $opts{COLORMAP};
1733             delete ($opts{COLORMAP});
1734              
1735             # handle XLAB, YLAB and TITLE options
1736             my $title = $opts{TITLE} || '';
1737             my $xlab = $opts{XLAB} || '';
1738             my @ylabs = defined($opts{YLAB}) && (ref($opts{YLAB}) =~ /ARRAY/) ? @{$opts{YLAB}} : ();
1739             delete @opts{qw(TITLE XLAB YLAB)};
1740              
1741             # Ensure we're dealing with an array reference
1742             my $ys;
1743             if (ref ($yargs) eq 'ARRAY') {
1744             $ys = $yargs;
1745             }
1746             elsif (ref ($yargs) =~ /PDL/) {
1747             $ys = [dog $yargs];
1748             }
1749             else {
1750             barf("stripplots requires that its second argument be either a 2D ndarray or\na reference to a list of 1D ndarrays, but you provided neither.");
1751             }
1752              
1753             # This doesn't work because $xs can be an anonymous array, too
1754             # # Let's be sure the user sent us what we expected:
1755             # foreach (@$ys) {
1756             # barf ("stripplots needs to have ndarrays for its y arguments!")
1757             # unless (ref =~ /PDL/);
1758             # barf("stripplots requires that the x and y dimensions agree!")
1759             # unless ($_->nelem == $xs->nelem);
1760             # }
1761              
1762             my $nplots = @$ys;
1763              
1764             # Use list of colors, or single color. If COLOR not specified, default to BLACK for each graph
1765             my @colors = (defined ($opts{COLOR}) && ref($opts{COLOR}) =~ /ARRAY/) ? @{$opts{COLOR}}
1766             : defined ($opts{COLOR}) ? ($opts{COLOR}) x $nplots
1767             : ('BLACK') x $nplots;
1768             delete @opts{qw(COLOR)};
1769              
1770             my $y_base = defined($opts{Y_BASE}) ? $opts{Y_BASE} : 0.1; # Y offset to start bottom plot
1771             my $y_gutter = defined($opts{Y_GUTTER}) ? $opts{Y_GUTTER} : 0.02; # Y gap between plots
1772             delete @opts{qw(Y_BASE Y_GUTTER)};
1773              
1774             # apply options
1775             $self->setparm(%opts);
1776              
1777             my ($xmin, $xmax);
1778             if (ref ($xs) =~ /PDL/) {
1779             ($xmin, $xmax) = $xs->minmax;
1780             }
1781             else {
1782             $xmin = pdl(map { $_->min } @$xs)->min;
1783             $xmax = pdl(map { $_->max } @$xs)->max;
1784             }
1785              
1786             SUBPAGE:
1787             for (my $subpage=0;$subpage<$nplots;$subpage++) {
1788              
1789             my $y = $ys->[$subpage];
1790             my $x = ref ($xs) =~ /PDL/ ? $xs : $xs->[$subpage];
1791             my $mask = $y->isgood;
1792             $y = $y->where($mask);
1793             $x = $x->where($mask);
1794             my $z = $zs->slice(":,($subpage)")->where($mask) if (defined($zs));
1795             my $yeb = $yebs->slice(":,($subpage)")->where($mask) if (defined($yebs));
1796             my $ylab = $ylabs[$subpage];
1797              
1798             my $bottomplot = ($subpage == 0);
1799             my $topplot = ($subpage == $nplots-1);
1800              
1801             my $xbox = 'bc';
1802             $xbox = 'cstnb' if ($bottomplot);
1803              
1804             my $box = $opts{BOX};
1805             my $yrange = defined($box) ? $$box[3] - $$box[2] : $y->max - $y->min;
1806             my $del = $yrange ? $yrange * 0.05 : 1;
1807             my @ybounds = ($y->min - $del, $y->max + $del);
1808             my $ytick = ($yrange/$nytick);
1809             my @COLORMAP = (COLORMAP => $z) if defined($z);
1810             $self->xyplot($x, $y,
1811             COLOR => $colors[$subpage],
1812             BOX => defined($box) ? $box : [$xmin, $xmax, @ybounds],
1813             XBOX => $xbox,
1814             YBOX => 'BCNT',
1815             YTICK => $ytick,
1816             MAJTICKSIZE => 0.6,
1817             CHARSIZE => 0.4,
1818             @COLORMAP,
1819             VIEWPORT => [
1820             0.15,
1821             0.9,
1822             $y_base + ($subpage * (0.8/$nplots)),
1823             $y_base - $y_gutter + (($subpage+1) * (0.8/$nplots)),
1824             ],
1825             );
1826              
1827             $self->text($ylab, TEXTPOSITION => ['L', 4, 0.5, 0.5], COLOR => 'BLACK', CHARSIZE => 0.6) if (defined($ylab));
1828             $self->text($xlab, TEXTPOSITION => ['B', 3, 0.5, 0.5], COLOR => 'BLACK', CHARSIZE => 0.6) if ($xlab && $bottomplot);
1829             $self->text($title, TEXTPOSITION => ['T', 2, 0.5, 0.5], COLOR => 'BLACK', CHARSIZE => 1.3) if ($title && $topplot);
1830              
1831             }
1832              
1833             }
1834              
1835             # Draw a color key or wedge showing the scale of map1 colors
1836             sub colorkey {
1837             my $self = shift;
1838             my $var = shift;
1839             my $orientation = shift; # 'v' (for vertical) or 'h' (for horizontal)
1840              
1841             my %opts = @_;
1842              
1843             # Set PLplot to right output stream
1844             plsstrm($self->{STREAMNUMBER});
1845              
1846             # apply options
1847             $self->setparm(%opts);
1848              
1849             # set up viewport, subpage, world coordinates
1850             $self->_setwindow;
1851              
1852             # draw labels
1853             $self->_drawlabels;
1854              
1855             # Allow user to set X, Y box type for color key scale. D. Hunt 1/7/2009
1856             my $xbox = exists($self->{XBOX}) ? $self->{XBOX} : 'TM';
1857             my $ybox = exists($self->{YBOX}) ? $self->{YBOX} : 'TM';
1858              
1859             my @box;
1860              
1861             plcol0 (1); # set to frame color
1862              
1863             my ($min, $max) = exists ($self->{ZRANGE}) ? @{$self->{ZRANGE}} : $var->minmax;
1864              
1865             # plot box
1866             if ($orientation eq 'v') {
1867             # set world coordinates based on input variable
1868             @box = (0, 1, $min, $max);
1869             plwind (@box);
1870             plbox (0, 0, 0, 0, '', $ybox); # !!! note out of order call
1871             } elsif ($orientation eq 'h') {
1872             @box = ($min, $max, 0, 1);
1873             plwind (@box);
1874             plbox (0, 0, 0, 0, $xbox, ''); # !!! note out of order call
1875             } else {
1876             die "Illegal orientation value: $orientation. Should be 'v' (vertical) or 'h' (horizontal)";
1877             }
1878              
1879             # restore color setting
1880             plcol0 ($self->{CURRENT_COLOR_IDX});
1881              
1882             # This is the number of colors shown in the color wedge. Make
1883             # this smaller for gif images as these are limited to 256 colors total.
1884             # D. Hunt 8/9/2006
1885             my $ncols = ($self->{DEV} =~ /gif/) ? 32 : 128;
1886              
1887             if ($orientation eq 'v') {
1888             my $yinc = ($box[3] - $box[2])/$ncols;
1889             my $y0 = $box[2];
1890             for (my $i=0;$i<$ncols;$i++) {
1891             $y0 = $box[2] + ($i * $yinc);
1892             my $y1 = $y0 + $yinc;
1893             PDL::Graphics::PLplot::plcol1($i/$ncols);
1894              
1895             # Instead of using plfill (which is not supported on some devices)
1896             # use multiple calls to plline to color in the space. D. Hunt 8/9/2006
1897             foreach my $inc (0..9) {
1898             my $frac = $inc * 0.1;
1899             my $y = $y0 + (($y1 - $y0) * $frac);
1900             PDL::Graphics::PLplot::plline (PDL->new(0,1), PDL->new($y,$y));
1901             }
1902              
1903             }
1904             } else {
1905             my $xinc = ($box[1] - $box[0])/$ncols;
1906             my $x0 = $box[0];
1907             for (my $i=0;$i<$ncols;$i++) {
1908             $x0 = $box[0] + ($i * $xinc);
1909             my $x1 = $x0 + $xinc;
1910             PDL::Graphics::PLplot::plcol1($i/$ncols);
1911              
1912             # Instead of using plfill (which is not supported on some devices)
1913             # use multiple calls to plline to color in the space. D. Hunt 8/9/2006
1914             foreach my $inc (0..9) {
1915             my $frac = $inc * 0.1;
1916             my $x = $x0 + (($x1 - $x0) * $frac);
1917             PDL::Graphics::PLplot::plline (PDL->new($x,$x), PDL->new(0,1));
1918             }
1919              
1920             }
1921             }
1922              
1923             # Flush the PLplot stream.
1924             plflush();
1925             }
1926              
1927             sub shadeplot {
1928             my $self = shift;
1929             my $z = shift;
1930             my $nsteps = shift;
1931              
1932             my %opts = @_;
1933              
1934             # Set PLplot to right output stream
1935             plsstrm($self->{STREAMNUMBER});
1936              
1937             # apply options
1938             $self->setparm(%opts);
1939              
1940             my ($nx, $ny) = $z->dims;
1941              
1942             unless (exists($self->{BOX})) {
1943             $self->{BOX} = [0, $nx, 0, $ny];
1944             }
1945              
1946             # set up plotting box
1947             $self->_setwindow;
1948              
1949             # draw labels
1950             $self->_drawlabels;
1951              
1952             # plot box
1953             plcol0 (1); # set to frame color
1954             plbox ($self->{XTICK}, $self->{NXSUB}, $self->{YTICK}, $self->{NYSUB},
1955             $self->{XBOX}, $self->{YBOX}); # !!! note out of order call
1956              
1957             my ($min, $max) = exists ($self->{ZRANGE}) ? @{$self->{ZRANGE}} : $z->minmax;
1958             my $clevel = ((PDL->sequence($nsteps)*(($max - $min)/($nsteps-1))) + $min);
1959              
1960             # may add as options later. Now use constants
1961             my $fill_width = 2;
1962             my $cont_color = 0;
1963             my $cont_width = 0;
1964              
1965             my $rectangular = 1; # only false for non-linear coord mapping (not done yet in perl)
1966              
1967             # Use a user-defined grid map if requested. This is an X and Y vector that
1968             # tells what are the world coordinates for each pixel in $z
1969             # It is also possible to specify a 2D mapping for non-linear transforms. This is specified
1970             # in GRIDMAP2.
1971             my ($xmap, $ymap, $grid, $mapping_function);
1972             if (exists($self->{GRIDMAP})) {
1973             ($xmap, $ymap) = @{$self->{GRIDMAP}};
1974             $grid = plAllocGrid ($xmap, $ymap);
1975             $mapping_function = \&pltr1;
1976             } elsif (exists($self->{GRIDMAP2})) {
1977             ($xmap, $ymap) = @{$self->{GRIDMAP2}};
1978             $grid = plAlloc2dGrid ($xmap, $ymap);
1979             $mapping_function = \&pltr2;
1980             } else {
1981             # map X coords linearly to X range, Y coords linearly to Y range
1982             $xmap = ((PDL->sequence($nx)*(($self->{BOX}[1] - $self->{BOX}[0])/($nx - 1))) + $self->{BOX}[0]);
1983             $ymap = ((PDL->sequence($ny)*(($self->{BOX}[3] - $self->{BOX}[2])/($ny - 1))) + $self->{BOX}[2]);
1984             $grid = plAllocGrid ($xmap, $ymap);
1985             $mapping_function = \&pltr1;
1986             }
1987              
1988             # Choose shade plot or contour plot
1989             if (defined($self->{PLOTTYPE}) && ($self->{PLOTTYPE} eq 'CONTOUR') ) {
1990              
1991             if (defined($self->{CONTOURLABELS}) && $self->{CONTOURLABELS}) {
1992             my ($offset, $size, $spacing, $lexp, $sigdig) = @{$self->{CONTOURLABELS}};
1993             pl_setcontlabelparam ($offset, $size, $spacing, 1); # 1 = activate
1994             pl_setcontlabelformat ($lexp, $sigdig);
1995             } else { # == 0, set labels off
1996             pl_setcontlabelparam (0.006, 0.3, 0.1, 0); # 0 = deactivate
1997             }
1998              
1999             plcont ($z, 1, $nx-1, 1, $ny-1, $clevel, $mapping_function, $grid);
2000              
2001             } else {
2002              
2003             plshades($z, @{$self->{BOX}}, $clevel, $fill_width,
2004             $cont_color, $cont_width, $rectangular,
2005             0, $mapping_function, $grid);
2006              
2007             }
2008              
2009             if (exists($self->{GRIDMAP2})) {
2010             plFree2dGrid ($grid);
2011             } else {
2012             plFreeGrid ($grid);
2013             }
2014              
2015             # Flush the PLplot stream.
2016             plflush();
2017             }
2018              
2019             sub histogram1 {
2020             my $self = shift;
2021             my $x = shift;
2022             my $nbins = shift;
2023              
2024             my $n = $x->nelem;
2025              
2026             my ($min, $max);
2027             if (exists($self->{BOX})) {
2028             ($min, $max) = @{$self->{BOX}}[0,1];
2029             } else {
2030             ($min, $max) = $x->minmax;
2031             }
2032              
2033             my $step = ($max - $min)/$nbins;
2034             my ($xvals, $yvals) = PDL::hist($x,$min,$max,$step);
2035              
2036             $self->{BOX} = [$min, $max, 0, $yvals->max] unless (exists($self->{BOX}));
2037              
2038             # apply options
2039             my %opts = @_;
2040             $self->setparm(%opts);
2041              
2042             # set up plotting box
2043             $self->_setwindow;
2044              
2045             # draw labels
2046             $self->_drawlabels;
2047              
2048             # plot box
2049             plcol0 (1); # set to frame color
2050             plbox ('', '', '', '', 'BNTI', 'BNTI'); # !!! note out of order call
2051              
2052             # draw colored histogram boxes
2053             plcol0 ($self->{CURRENT_COLOR_IDX});
2054             for (my $i=0;$i<$yvals->nelem;$i++) {
2055             my $y = $yvals->at($i);
2056             next if ($y == 0); # don't bother plotting
2057              
2058             my $x = $xvals->at($i);
2059              
2060             my $x0 = $x - ($step/2);
2061             my $x1 = $x + ($step/2);
2062             plfill (PDL->new($x0, $x1, $x1, $x0), PDL->new(0, 0, $y, $y));
2063             }
2064              
2065             # set color to frame color
2066             plcol0 (1);
2067              
2068             # draw outline for histogram blocks
2069             plbin ($xvals->nelem, $xvals, $yvals, 1); # '1' is oldbins parm: dont call plenv!
2070              
2071             }
2072              
2073             sub histogram {
2074             my $self = shift;
2075             my $x = shift;
2076             my $nbins = shift;
2077              
2078             my %opts = @_;
2079              
2080             # Set PLplot to right output stream
2081             plsstrm($self->{STREAMNUMBER});
2082              
2083             # apply options
2084             $self->setparm(%opts);
2085              
2086             my ($min, $max);
2087             if (exists($self->{BOX})) {
2088             ($min, $max) = @{$self->{BOX}}[0,1];
2089             } else {
2090             ($min, $max) = $x->minmax;
2091             $self->{BOX} = [$min, $max, 0, $x->nelem]; # box probably too tall!
2092             }
2093              
2094             # set up plotting box
2095             $self->_setwindow;
2096              
2097             # draw labels
2098             $self->_drawlabels;
2099              
2100             # plot box
2101             plcol0 (1); # set to frame color
2102             plbox ($self->{XTICK}, $self->{NXSUB}, $self->{YTICK}, $self->{NYSUB},
2103             $self->{XBOX}, $self->{YBOX}); # !!! note out of order call
2104              
2105             # set line style for plot only (not box)
2106             pllsty ($self->{LINESTYLE});
2107              
2108             # set line width for plot only (not box)
2109             plwidth ($self->{LINEWIDTH});
2110              
2111             # set color for histograms
2112             plcol0 ($self->{CURRENT_COLOR_IDX});
2113              
2114             plhist ($x, $min, $max, $nbins, 1); # '1' is oldbins parm: dont call plenv!
2115              
2116             # set line width back
2117             plwidth (0);
2118              
2119             # Flush the PLplot stream.
2120             plflush();
2121             }
2122              
2123             sub bargraph {
2124             my $self = shift;
2125             my $labels = shift; # ref to perl list of labels for bars
2126             my $values = shift; # pdl of values for bars
2127              
2128             my %opts = @_;
2129              
2130             # max number of readable labels on x axis
2131             my $maxlab = defined($opts{MAXBARLABELS}) ? $opts{MAXBARLABELS} : 20;
2132             delete ($opts{MAXBARLABELS});
2133              
2134             # Set PLplot to right output stream
2135             plsstrm($self->{STREAMNUMBER});
2136             my $xmax = scalar(@$labels);
2137              
2138             # apply options
2139             $self->setparm(%opts);
2140              
2141             my $color_stack = $self->{STACKED_BAR_COLORS} // 0; # A list of colors for a stacked bar chart
2142              
2143             # ymax is either the largest value in bars, or the largest total of all stacked bars
2144             my ($ymin, $ymax);
2145             if ($color_stack) {
2146             $ymin = 0;
2147             $ymax = $values->xchg(0,1)->sumover->max;
2148             } else {
2149             ($ymin, $ymax) = $values->minmax;
2150             }
2151              
2152             unless (exists($self->{BOX})) {
2153             $self->{BOX} = [0, $xmax, $ymin, $ymax]; # box probably too tall!
2154             }
2155              
2156             # set up plotting box
2157             $self->_setwindow;
2158              
2159             # draw labels
2160             $self->_drawlabels;
2161              
2162             # plot box
2163             plcol0 (1); # set to frame color
2164             plbox ($self->{XTICK}, $self->{NXSUB}, $self->{YTICK}, $self->{NYSUB},
2165             'bc', $self->{YBOX}); # !!! note out of order call
2166              
2167             # Now respect TEXTPOSITION setting if TEXTMODE eq 'border'
2168             # This allows the user to tweak the label placement. D. Hunt 9/4/2007
2169             my ($side, $disp, $foo, $just) = ('BV', 0.2, 0, 1.0);
2170             if (defined($self->{TEXTMODE}) && $self->{TEXTMODE} eq 'border') {
2171             ($side, $disp, $foo, $just) = @{$self->{TEXTPOSITION}};
2172             }
2173              
2174             # plot labels
2175             plschr (0, $self->{CHARSIZE} * 0.7); # use smaller characters
2176             my $pos = 0;
2177             my $skip = int($xmax/$maxlab) + 1;
2178             for (my $i=0;$i<$xmax;$i+=$skip) {
2179             $pos = ((0.5+$i)/$xmax);
2180             my $lab = $$labels[$i];
2181             plmtex ($disp, $pos, $just, $side, $lab); # !!! out of order parms
2182             }
2183              
2184             plcol0 ($self->{CURRENT_COLOR_IDX}); # set back to line color
2185              
2186             # set line style for plot only (not box)
2187             pllsty ($self->{LINESTYLE});
2188              
2189             # set line width for plot only (not box)
2190             plwidth ($self->{LINEWIDTH});
2191              
2192             #
2193             ## draw bars
2194             #
2195              
2196             # Stacked bar chart
2197             if ($color_stack) {
2198              
2199             my $idx = 0;
2200             my $bh = zeroes($xmax); # base height
2201             my $w = ones($xmax); # bar width
2202             foreach my $color (@$color_stack) {
2203             $self->setparm(COLOR => $color);
2204             plcol0 ($self->{CURRENT_COLOR_IDX}); # set to current box color
2205             my $x = PDL->sequence($xmax)+0.5;
2206             my $y = $values->slice(":,($idx)");
2207             if ($self->{UNFILLED_BARS}) {
2208             plunfbox1 ($x, $y, $bh, $w);
2209             } else {
2210             plfbox1 ($x, $y, $bh, $w);
2211             }
2212             $bh += $y; # Increment the base height by the height of the last set of bars
2213             $idx++;
2214             }
2215              
2216             plcol0 ($self->{CURRENT_COLOR_IDX}); # set back to line color
2217              
2218             } else { # Normal bar chart
2219              
2220             if ($self->{UNFILLED_BARS}) {
2221             plunfbox (PDL->sequence($xmax)+0.5, $values);
2222             } else {
2223             plfbox (PDL->sequence($xmax)+0.5, $values);
2224             }
2225              
2226             }
2227              
2228             # set line width back
2229             plwidth (0);
2230              
2231             # set char size back
2232             plschr (0, $self->{CHARSIZE});
2233              
2234             # Flush the PLplot stream.
2235             plflush();
2236             }
2237              
2238             sub text {
2239             my $self = shift;
2240             my $text = shift;
2241              
2242             # Set PLplot to right output stream
2243             plsstrm($self->{STREAMNUMBER});
2244              
2245             # apply options
2246             $self->setparm(@_);
2247              
2248             # set up viewport, subpage, world coordinates
2249             $self->_setwindow;
2250              
2251             # set the color according to the color specified in the object
2252             plcol0 ($self->{CURRENT_COLOR_IDX});
2253              
2254             # plot either relative to border, or inside view port
2255             if ($self->{TEXTMODE} eq 'border') {
2256             my ($side, $disp, $pos, $just) = @{$self->{TEXTPOSITION}};
2257             plmtex ($disp, $pos, $just, $side, $text); # !!! out of order parms
2258             } elsif ($self->{TEXTMODE} eq 'plot') {
2259             my ($x, $y, $dx, $dy, $just) = @{$self->{TEXTPOSITION}};
2260             plptex ($x, $y, $dx, $dy, $just, $text);
2261             }
2262              
2263             # Flush the PLplot stream.
2264             plflush();
2265             }
2266              
2267             # Clear the current page. This should only be used with interactive devices!
2268             sub clear {
2269             my $self = shift;
2270              
2271             # Set PLplot to right output stream
2272             plsstrm($self->{STREAMNUMBER});
2273              
2274             plclear();
2275             return;
2276             }
2277              
2278             # Get mouse click coordinates (OO version). This should only be used with interactive devices!
2279             sub cursor {
2280             my $self = shift;
2281              
2282             # Set PLplot to right output stream
2283             plsstrm($self->{STREAMNUMBER});
2284              
2285             # Flush the stream, to make sure the plot is visible & current
2286             plflush();
2287              
2288             # Get the cursor position
2289             my %gin = plGetCursor();
2290              
2291             # Return an array with the coordinates of the mouse click
2292             return ($gin{"wX"}, $gin{"wY"}, $gin{"pX"}, $gin{"pY"}, $gin{"dX"}, $gin{"dY"});
2293             }
2294              
2295             # Explicitly close a plot and free the object
2296             sub close {
2297             my $self = shift;
2298              
2299             # Set PLplot to right output stream
2300             plsstrm($self->{STREAMNUMBER});
2301              
2302             plend1 ();
2303              
2304             # Return this stream number to the pool.
2305             push (@plplot_stream_pool, $self->{STREAMNUMBER});
2306             delete $self->{STREAMNUMBER};
2307              
2308             return;
2309             }
2310             #line 2311 "PLplot.pm"
2311              
2312              
2313             =head1 FUNCTIONS
2314              
2315             =cut
2316              
2317              
2318              
2319              
2320              
2321             #line 2473 "plplot.pd"
2322              
2323             my %REORDER = (
2324             plaxes => [0,1,6,2,3,7,4,5],
2325             plbox => [4,0,1,5,2,3], # 4th arg -> 0th arg, 0th arg -> 1st arg, etc
2326             plbox3 => [6,7,0,1,8,9,2,3,10,11,4,5],
2327             plmtex => [3,0,1,2,4],
2328             plmtex3 => [3,0,1,2,4],
2329             plstart => [2,0,1],
2330             plstripc => [\13,14,15,0..12,16..19],
2331             plmap => [4,5,0..3],
2332             plmeridians => [6,0..5], # 6th PDL arg gets sent as 0th C arg
2333             plshades => [0,10,1..9,11,12],
2334             plshade1 => [0,15,1..14,16,17],
2335             );
2336             sub _reorder {
2337             my ($name, $int_name, $need_reorder) = splice @_, 0, 3;
2338             my $ordering = $REORDER{$name};
2339             die "Cannot find argument reordering for $name" if !defined $ordering;
2340             my $missing = @_ != @$ordering;
2341             no strict 'refs';
2342             return $int_name->(@_) if !$missing and !$need_reorder;
2343             # either need to insert output ndarray, or reorder, or both
2344             my ($outarg_index) = map ref($_)?$$_:(), @$ordering;
2345             confess "$name: wrong number of args but no output arg\n"
2346             if $missing and !defined $outarg_index;
2347             my @pdl_args = @_;
2348             if (!$need_reorder) {
2349             # args in PDL order; by definition need insert output
2350             splice @pdl_args, $outarg_index, 0, my $out_ndarray = PDL->null;
2351             $int_name->(@pdl_args);
2352             return $out_ndarray;
2353             }
2354             # need to reorder, might need to insert output
2355             my $out_ndarray;
2356             if ($missing) {
2357             $out_ndarray = PDL->null;
2358             my $i = 0;
2359             @pdl_args = map ref($_) ? $out_ndarray : $pdl_args[$i++], @$ordering;
2360             }
2361             my @pdl_indices = map ref($_)?$$_:$_, @$ordering;
2362             my @input_indices = 0..$#$ordering;
2363             @pdl_args[@pdl_indices] = @pdl_args[@input_indices];
2364             $int_name->(@pdl_args);
2365             $missing ? $out_ndarray : ();
2366             }
2367              
2368             # Routine for users to set normal plplot argument order
2369             sub plplot_use_standard_argument_order {
2370             $PDL::Graphics::PLplot::standard_order = shift;
2371             }
2372              
2373             #line 2529 "plplot.pd"
2374              
2375             =pod
2376              
2377             The PDL low-level interface to the PLplot library closely mimics the C API.
2378             Users are referred to the PLplot User's Manual, distributed with the source
2379             PLplot tarball. This manual is also available on-line at the PLplot web
2380             site (L).
2381              
2382             There are three differences in the way the functions are called. The first
2383             one is due to a limitation in the pp_def wrapper of PDL, which forces all
2384             the non-ndarray arguments to be at the end of the arguments list. It is
2385             the case of strings (C) arguments in the C API. This affects the
2386             following functions:
2387              
2388             plaxes
2389             plbox
2390             plbox3
2391             plmtex
2392             plmtex3
2393             plstart
2394             plstripc
2395             plmap
2396             plmeridians
2397             plshades
2398             plshade1
2399              
2400             This difference can be got around by a call to
2401              
2402             plplot_use_standard_argument_order(1);
2403              
2404             This re-arranges the string arguments to their proper/intuitive position
2405             compared with the C plplot interface. This can be restored to its default
2406             by calling:
2407              
2408             plplot_use_standard_argument_order(0);
2409              
2410             The second notable different between the C and the PDL APIs is that many of
2411             the PDL calls do not need arguments to specify the size of the the vectors
2412             and/or matrices being passed. These size parameters are deduced from the
2413             size of the ndarrays, when possible and are just omitted from the C call
2414             when translating it to perl.
2415              
2416             The third difference has to do with output parameters. In C these are
2417             passed in with the input parameters. In the perl interface, they are omitted.
2418             For example:
2419              
2420             C:
2421              
2422             pllegend(&p_legend_width, &p_legend_height,
2423             opt, position, x, y, plot_width, bg_color, bb_color, bb_style, nrow, ncolumn, nlegend,
2424             opt_array,
2425             text_offset, text_scale, text_spacing, text_justification,
2426             text_colors, (const char **)text, box_colors, box_patterns, box_scales, box_line_widths,
2427             line_colors, line_styles, line_widths, symbol_colors, symbol_scales, symbol_numbers, (const char **)symbols);
2428              
2429             perl:
2430              
2431             my ($legend_width, $legend_height) =
2432             pllegend ($position, $opt, $x, $y, $plot_width, $bg_color, $nlegend,
2433             \@opt_array,
2434             $text_offset, $text_scale, $text_spacing, $test_justification,
2435             \@text_colors, \@text, \@box_colors, \@box_patterns, \@box_scales, \@line_colors,
2436             \@line_styles, \@line_widths, \@symbol_colors, \@symbol_scales, \@symbol_numbers, \@symbols);
2437              
2438             Some of the API functions implemented in PDL have other specificities in
2439             comparison with the C API and will be discussed below.
2440              
2441             =cut
2442             #line 2443 "PLplot.pm"
2443              
2444              
2445             =head2 pladv
2446              
2447             =for sig
2448              
2449             Signature: (int page())
2450             Types: (double)
2451              
2452             =for usage
2453              
2454             pladv($page); # all arguments given
2455             $page->pladv; # method call
2456              
2457             =for ref
2458              
2459             info not available
2460              
2461             =pod
2462              
2463             Broadcasts over its inputs.
2464             Can't use POSIX threads.
2465              
2466             =for bad
2467              
2468             C does not process bad values.
2469             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2470              
2471             =cut
2472              
2473              
2474              
2475              
2476             *pladv = \&PDL::pladv;
2477              
2478              
2479              
2480              
2481              
2482              
2483             =head2 plaxes
2484              
2485             =for sig
2486              
2487             Signature: (double xzero();double yzero();double xtick();int nxsub();double ytick();int nysub(); char *xopt;char *yopt)
2488             Types: (double)
2489              
2490             =for usage
2491              
2492             plaxes($xzero, $yzero, $xtick, $nxsub, $ytick, $nysub, $xopt, $yopt); # all arguments given
2493             $xzero->plaxes($yzero, $xtick, $nxsub, $ytick, $nysub, $xopt, $yopt); # method call
2494              
2495             =for ref
2496              
2497             info not available
2498              
2499             =pod
2500              
2501             Broadcasts over its inputs.
2502             Can't use POSIX threads.
2503              
2504             =for bad
2505              
2506             C does not process bad values.
2507             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2508              
2509             =cut
2510              
2511              
2512              
2513              
2514 0     0 0 0 sub PDL::plaxes { _reorder('plaxes', 'PDL::_plaxes_int', $standard_order, @_) }
2515              
2516              
2517              
2518             *plaxes = \&PDL::plaxes;
2519              
2520              
2521              
2522              
2523              
2524              
2525             =head2 plbin
2526              
2527             =for sig
2528              
2529             Signature: (int nbin();double x(dima);double y(dima);int center())
2530             Types: (double)
2531              
2532             =for usage
2533              
2534             plbin($nbin, $x, $y, $center); # all arguments given
2535             $nbin->plbin($x, $y, $center); # method call
2536              
2537             =for ref
2538              
2539             info not available
2540              
2541             =pod
2542              
2543             Broadcasts over its inputs.
2544             Can't use POSIX threads.
2545              
2546             =for bad
2547              
2548             C does not process bad values.
2549             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2550              
2551             =cut
2552              
2553              
2554              
2555              
2556             *plbin = \&PDL::plbin;
2557              
2558              
2559              
2560              
2561              
2562              
2563             =head2 plbox
2564              
2565             =for sig
2566              
2567             Signature: (double xtick();int nxsub();double ytick();int nysub(); char *xopt;char *yopt)
2568             Types: (double)
2569              
2570             =for usage
2571              
2572             plbox($xtick, $nxsub, $ytick, $nysub, $xopt, $yopt); # all arguments given
2573             $xtick->plbox($nxsub, $ytick, $nysub, $xopt, $yopt); # method call
2574              
2575             =for ref
2576              
2577             info not available
2578              
2579             =pod
2580              
2581             Broadcasts over its inputs.
2582             Can't use POSIX threads.
2583              
2584             =for bad
2585              
2586             C does not process bad values.
2587             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2588              
2589             =cut
2590              
2591              
2592              
2593              
2594 1056     1056 0 4655065 sub PDL::plbox { _reorder('plbox', 'PDL::_plbox_int', $standard_order, @_) }
2595              
2596              
2597              
2598             *plbox = \&PDL::plbox;
2599              
2600              
2601              
2602              
2603              
2604              
2605             =head2 plbox3
2606              
2607             =for sig
2608              
2609             Signature: (double xtick();int nsubx();double ytick();int nsuby();double ztick();int nsubz(); char *xopt;char *xlabel;char *yopt;char *ylabel;char *zopt;char *zlabel)
2610             Types: (double)
2611              
2612             =for usage
2613              
2614             plbox3($xtick, $nsubx, $ytick, $nsuby, $ztick, $nsubz, $xopt, $xlabel, $yopt, $ylabel, $zopt, $zlabel); # all arguments given
2615             $xtick->plbox3($nsubx, $ytick, $nsuby, $ztick, $nsubz, $xopt, $xlabel, $yopt, $ylabel, $zopt, $zlabel); # method call
2616              
2617             =for ref
2618              
2619             info not available
2620              
2621             =pod
2622              
2623             Broadcasts over its inputs.
2624             Can't use POSIX threads.
2625              
2626             =for bad
2627              
2628             C does not process bad values.
2629             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2630              
2631             =cut
2632              
2633              
2634              
2635              
2636 38     38 0 986036 sub PDL::plbox3 { _reorder('plbox3', 'PDL::_plbox3_int', $standard_order, @_) }
2637              
2638              
2639              
2640             *plbox3 = \&PDL::plbox3;
2641              
2642              
2643              
2644              
2645              
2646              
2647             =head2 plcol0
2648              
2649             =for sig
2650              
2651             Signature: (int icolzero())
2652             Types: (double)
2653              
2654             =for usage
2655              
2656             plcol0($icolzero); # all arguments given
2657             $icolzero->plcol0; # method call
2658              
2659             =for ref
2660              
2661             info not available
2662              
2663             =pod
2664              
2665             Broadcasts over its inputs.
2666             Can't use POSIX threads.
2667              
2668             =for bad
2669              
2670             C does not process bad values.
2671             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2672              
2673             =cut
2674              
2675              
2676              
2677              
2678             *plcol0 = \&PDL::plcol0;
2679              
2680              
2681              
2682              
2683              
2684              
2685             =head2 plcol1
2686              
2687             =for sig
2688              
2689             Signature: (double colone())
2690             Types: (double)
2691              
2692             =for usage
2693              
2694             plcol1($colone); # all arguments given
2695             $colone->plcol1; # method call
2696              
2697             =for ref
2698              
2699             info not available
2700              
2701             =pod
2702              
2703             Broadcasts over its inputs.
2704             Can't use POSIX threads.
2705              
2706             =for bad
2707              
2708             C does not process bad values.
2709             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2710              
2711             =cut
2712              
2713              
2714              
2715              
2716             *plcol1 = \&PDL::plcol1;
2717              
2718              
2719              
2720              
2721              
2722              
2723             =head2 plcpstrm
2724              
2725             =for sig
2726              
2727             Signature: (int iplsr();int flags())
2728             Types: (double)
2729              
2730             =for usage
2731              
2732             plcpstrm($iplsr, $flags); # all arguments given
2733             $iplsr->plcpstrm($flags); # method call
2734              
2735             =for ref
2736              
2737             info not available
2738              
2739             =pod
2740              
2741             Broadcasts over its inputs.
2742             Can't use POSIX threads.
2743              
2744             =for bad
2745              
2746             C does not process bad values.
2747             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2748              
2749             =cut
2750              
2751              
2752              
2753              
2754             *plcpstrm = \&PDL::plcpstrm;
2755              
2756              
2757              
2758              
2759              
2760              
2761             =head2 pldid2pc
2762              
2763             =for sig
2764              
2765             Signature: (double xmin(dima);double ymin(dima);double xmax(dima);double ymax(dima))
2766             Types: (double)
2767              
2768             =for usage
2769              
2770             pldid2pc($xmin, $ymin, $xmax, $ymax); # all arguments given
2771             $xmin->pldid2pc($ymin, $xmax, $ymax); # method call
2772              
2773             =for ref
2774              
2775             info not available
2776              
2777             =pod
2778              
2779             Broadcasts over its inputs.
2780             Can't use POSIX threads.
2781              
2782             =for bad
2783              
2784             C does not process bad values.
2785             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2786              
2787             =cut
2788              
2789              
2790              
2791              
2792             *pldid2pc = \&PDL::pldid2pc;
2793              
2794              
2795              
2796              
2797              
2798              
2799             =head2 pldip2dc
2800              
2801             =for sig
2802              
2803             Signature: (double xmin(dima);double ymin(dima);double xmax(dima);double ymax(dima))
2804             Types: (double)
2805              
2806             =for usage
2807              
2808             pldip2dc($xmin, $ymin, $xmax, $ymax); # all arguments given
2809             $xmin->pldip2dc($ymin, $xmax, $ymax); # method call
2810              
2811             =for ref
2812              
2813             info not available
2814              
2815             =pod
2816              
2817             Broadcasts over its inputs.
2818             Can't use POSIX threads.
2819              
2820             =for bad
2821              
2822             C does not process bad values.
2823             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2824              
2825             =cut
2826              
2827              
2828              
2829              
2830             *pldip2dc = \&PDL::pldip2dc;
2831              
2832              
2833              
2834              
2835              
2836              
2837             =head2 plenv
2838              
2839             =for sig
2840              
2841             Signature: (double xmin();double xmax();double ymin();double ymax();int just();int axis())
2842             Types: (double)
2843              
2844             =for usage
2845              
2846             plenv($xmin, $xmax, $ymin, $ymax, $just, $axis); # all arguments given
2847             $xmin->plenv($xmax, $ymin, $ymax, $just, $axis); # method call
2848              
2849             =for ref
2850              
2851             info not available
2852              
2853             =pod
2854              
2855             Broadcasts over its inputs.
2856             Can't use POSIX threads.
2857              
2858             =for bad
2859              
2860             C does not process bad values.
2861             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2862              
2863             =cut
2864              
2865              
2866              
2867              
2868             *plenv = \&PDL::plenv;
2869              
2870              
2871              
2872              
2873              
2874              
2875             =head2 plenv0
2876              
2877             =for sig
2878              
2879             Signature: (double xmin();double xmax();double ymin();double ymax();int just();int axis())
2880             Types: (double)
2881              
2882             =for usage
2883              
2884             plenv0($xmin, $xmax, $ymin, $ymax, $just, $axis); # all arguments given
2885             $xmin->plenv0($xmax, $ymin, $ymax, $just, $axis); # method call
2886              
2887             =for ref
2888              
2889             info not available
2890              
2891             =pod
2892              
2893             Broadcasts over its inputs.
2894             Can't use POSIX threads.
2895              
2896             =for bad
2897              
2898             C does not process bad values.
2899             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2900              
2901             =cut
2902              
2903              
2904              
2905              
2906             *plenv0 = \&PDL::plenv0;
2907              
2908              
2909              
2910              
2911              
2912              
2913             =head2 plerrx
2914              
2915             =for sig
2916              
2917             Signature: (int n();double xmin(dima);double xmax(dima);double y(dima))
2918             Types: (double)
2919              
2920             =for usage
2921              
2922             plerrx($n, $xmin, $xmax, $y); # all arguments given
2923             $n->plerrx($xmin, $xmax, $y); # method call
2924              
2925             =for ref
2926              
2927             info not available
2928              
2929             =pod
2930              
2931             Broadcasts over its inputs.
2932             Can't use POSIX threads.
2933              
2934             =for bad
2935              
2936             C does not process bad values.
2937             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2938              
2939             =cut
2940              
2941              
2942              
2943              
2944             *plerrx = \&PDL::plerrx;
2945              
2946              
2947              
2948              
2949              
2950              
2951             =head2 plerry
2952              
2953             =for sig
2954              
2955             Signature: (int n();double x(dima);double ymin(dima);double ymax(dima))
2956             Types: (double)
2957              
2958             =for usage
2959              
2960             plerry($n, $x, $ymin, $ymax); # all arguments given
2961             $n->plerry($x, $ymin, $ymax); # method call
2962              
2963             =for ref
2964              
2965             info not available
2966              
2967             =pod
2968              
2969             Broadcasts over its inputs.
2970             Can't use POSIX threads.
2971              
2972             =for bad
2973              
2974             C does not process bad values.
2975             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
2976              
2977             =cut
2978              
2979              
2980              
2981              
2982             *plerry = \&PDL::plerry;
2983              
2984              
2985              
2986              
2987              
2988              
2989             =head2 plfill3
2990              
2991             =for sig
2992              
2993             Signature: (int n();double x(dima);double y(dima);double z(dima))
2994             Types: (double)
2995              
2996             =for usage
2997              
2998             plfill3($n, $x, $y, $z); # all arguments given
2999             $n->plfill3($x, $y, $z); # method call
3000              
3001             =for ref
3002              
3003             info not available
3004              
3005             =pod
3006              
3007             Broadcasts over its inputs.
3008             Can't use POSIX threads.
3009              
3010             =for bad
3011              
3012             C does not process bad values.
3013             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3014              
3015             =cut
3016              
3017              
3018              
3019              
3020             *plfill3 = \&PDL::plfill3;
3021              
3022              
3023              
3024              
3025              
3026              
3027             =head2 plfont
3028              
3029             =for sig
3030              
3031             Signature: (int ifont())
3032             Types: (double)
3033              
3034             =for usage
3035              
3036             plfont($ifont); # all arguments given
3037             $ifont->plfont; # method call
3038              
3039             =for ref
3040              
3041             info not available
3042              
3043             =pod
3044              
3045             Broadcasts over its inputs.
3046             Can't use POSIX threads.
3047              
3048             =for bad
3049              
3050             C does not process bad values.
3051             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3052              
3053             =cut
3054              
3055              
3056              
3057              
3058             *plfont = \&PDL::plfont;
3059              
3060              
3061              
3062              
3063              
3064              
3065             =head2 plfontld
3066              
3067             =for sig
3068              
3069             Signature: (int fnt())
3070             Types: (double)
3071              
3072             =for usage
3073              
3074             plfontld($fnt); # all arguments given
3075             $fnt->plfontld; # method call
3076              
3077             =for ref
3078              
3079             info not available
3080              
3081             =pod
3082              
3083             Broadcasts over its inputs.
3084             Can't use POSIX threads.
3085              
3086             =for bad
3087              
3088             C does not process bad values.
3089             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3090              
3091             =cut
3092              
3093              
3094              
3095              
3096             *plfontld = \&PDL::plfontld;
3097              
3098              
3099              
3100              
3101              
3102              
3103             =head2 plgchr
3104              
3105             =for sig
3106              
3107             Signature: (double [o]p_def();double [o]p_ht())
3108             Types: (double)
3109              
3110             =for usage
3111              
3112             ($p_def, $p_ht) = plgchr();
3113             plgchr($p_def, $p_ht); # all arguments given
3114             $p_def->plgchr($p_ht);
3115              
3116             =for ref
3117              
3118             info not available
3119              
3120             =pod
3121              
3122             Broadcasts over its inputs.
3123             Can't use POSIX threads.
3124              
3125             =for bad
3126              
3127             C does not process bad values.
3128             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3129              
3130             =cut
3131              
3132              
3133              
3134              
3135             *plgchr = \&PDL::plgchr;
3136              
3137              
3138              
3139              
3140              
3141              
3142             =head2 plgcompression
3143              
3144             =for sig
3145              
3146             Signature: (int [o]compression())
3147             Types: (double)
3148              
3149             =for usage
3150              
3151             $compression = plgcompression();
3152             plgcompression($compression); # all arguments given
3153             $compression->plgcompression;
3154              
3155             =for ref
3156              
3157             info not available
3158              
3159             =pod
3160              
3161             Broadcasts over its inputs.
3162             Can't use POSIX threads.
3163              
3164             =for bad
3165              
3166             C does not process bad values.
3167             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3168              
3169             =cut
3170              
3171              
3172              
3173              
3174             *plgcompression = \&PDL::plgcompression;
3175              
3176              
3177              
3178              
3179              
3180              
3181             =head2 plgdidev
3182              
3183             =for sig
3184              
3185             Signature: (double [o]p_mar();double [o]p_aspect();double [o]p_jx();double [o]p_jy())
3186             Types: (double)
3187              
3188             =for usage
3189              
3190             ($p_mar, $p_aspect, $p_jx, $p_jy) = plgdidev();
3191             plgdidev($p_mar, $p_aspect, $p_jx, $p_jy); # all arguments given
3192             $p_mar->plgdidev($p_aspect, $p_jx, $p_jy);
3193              
3194             =for ref
3195              
3196             info not available
3197              
3198             =pod
3199              
3200             Broadcasts over its inputs.
3201             Can't use POSIX threads.
3202              
3203             =for bad
3204              
3205             C does not process bad values.
3206             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3207              
3208             =cut
3209              
3210              
3211              
3212              
3213             *plgdidev = \&PDL::plgdidev;
3214              
3215              
3216              
3217              
3218              
3219              
3220             =head2 plgdiori
3221              
3222             =for sig
3223              
3224             Signature: (double [o]p_rot())
3225             Types: (double)
3226              
3227             =for usage
3228              
3229             $p_rot = plgdiori();
3230             plgdiori($p_rot); # all arguments given
3231             $p_rot->plgdiori;
3232              
3233             =for ref
3234              
3235             info not available
3236              
3237             =pod
3238              
3239             Broadcasts over its inputs.
3240             Can't use POSIX threads.
3241              
3242             =for bad
3243              
3244             C does not process bad values.
3245             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3246              
3247             =cut
3248              
3249              
3250              
3251              
3252             *plgdiori = \&PDL::plgdiori;
3253              
3254              
3255              
3256              
3257              
3258              
3259             =head2 plgdiplt
3260              
3261             =for sig
3262              
3263             Signature: (double [o]p_xmin();double [o]p_ymin();double [o]p_xmax();double [o]p_ymax())
3264             Types: (double)
3265              
3266             =for usage
3267              
3268             ($p_xmin, $p_ymin, $p_xmax, $p_ymax) = plgdiplt();
3269             plgdiplt($p_xmin, $p_ymin, $p_xmax, $p_ymax); # all arguments given
3270             $p_xmin->plgdiplt($p_ymin, $p_xmax, $p_ymax);
3271              
3272             =for ref
3273              
3274             info not available
3275              
3276             =pod
3277              
3278             Broadcasts over its inputs.
3279             Can't use POSIX threads.
3280              
3281             =for bad
3282              
3283             C does not process bad values.
3284             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3285              
3286             =cut
3287              
3288              
3289              
3290              
3291             *plgdiplt = \&PDL::plgdiplt;
3292              
3293              
3294              
3295              
3296              
3297              
3298             =head2 plgfam
3299              
3300             =for sig
3301              
3302             Signature: (int [o]p_fam();int [o]p_num();int [o]p_bmax())
3303             Types: (double)
3304              
3305             =for usage
3306              
3307             ($p_fam, $p_num, $p_bmax) = plgfam();
3308             plgfam($p_fam, $p_num, $p_bmax); # all arguments given
3309             $p_fam->plgfam($p_num, $p_bmax);
3310              
3311             =for ref
3312              
3313             info not available
3314              
3315             =pod
3316              
3317             Broadcasts over its inputs.
3318             Can't use POSIX threads.
3319              
3320             =for bad
3321              
3322             C does not process bad values.
3323             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3324              
3325             =cut
3326              
3327              
3328              
3329              
3330             *plgfam = \&PDL::plgfam;
3331              
3332              
3333              
3334              
3335              
3336              
3337             =head2 plglevel
3338              
3339             =for sig
3340              
3341             Signature: (int [o]p_level())
3342             Types: (double)
3343              
3344             =for usage
3345              
3346             $p_level = plglevel();
3347             plglevel($p_level); # all arguments given
3348             $p_level->plglevel;
3349              
3350             =for ref
3351              
3352             info not available
3353              
3354             =pod
3355              
3356             Broadcasts over its inputs.
3357             Can't use POSIX threads.
3358              
3359             =for bad
3360              
3361             C does not process bad values.
3362             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3363              
3364             =cut
3365              
3366              
3367              
3368              
3369             *plglevel = \&PDL::plglevel;
3370              
3371              
3372              
3373              
3374              
3375              
3376             =head2 plgpage
3377              
3378             =for sig
3379              
3380             Signature: (double [o]p_xp();double [o]p_yp();int [o]p_xleng();int [o]p_yleng();int [o]p_xoff();int [o]p_yoff())
3381             Types: (double)
3382              
3383             =for usage
3384              
3385             ($p_xp, $p_yp, $p_xleng, $p_yleng, $p_xoff, $p_yoff) = plgpage();
3386             plgpage($p_xp, $p_yp, $p_xleng, $p_yleng, $p_xoff, $p_yoff); # all arguments given
3387             $p_xp->plgpage($p_yp, $p_xleng, $p_yleng, $p_xoff, $p_yoff);
3388              
3389             =for ref
3390              
3391             info not available
3392              
3393             =pod
3394              
3395             Broadcasts over its inputs.
3396             Can't use POSIX threads.
3397              
3398             =for bad
3399              
3400             C does not process bad values.
3401             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3402              
3403             =cut
3404              
3405              
3406              
3407              
3408             *plgpage = \&PDL::plgpage;
3409              
3410              
3411              
3412              
3413              
3414              
3415             =head2 plgspa
3416              
3417             =for sig
3418              
3419             Signature: (double [o]xmin();double [o]xmax();double [o]ymin();double [o]ymax())
3420             Types: (double)
3421              
3422             =for usage
3423              
3424             ($xmin, $xmax, $ymin, $ymax) = plgspa();
3425             plgspa($xmin, $xmax, $ymin, $ymax); # all arguments given
3426             $xmin->plgspa($xmax, $ymin, $ymax);
3427              
3428             =for ref
3429              
3430             info not available
3431              
3432             =pod
3433              
3434             Broadcasts over its inputs.
3435             Can't use POSIX threads.
3436              
3437             =for bad
3438              
3439             C does not process bad values.
3440             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3441              
3442             =cut
3443              
3444              
3445              
3446              
3447             *plgspa = \&PDL::plgspa;
3448              
3449              
3450              
3451              
3452              
3453              
3454             =head2 plgvpd
3455              
3456             =for sig
3457              
3458             Signature: (double [o]p_xmin();double [o]p_xmax();double [o]p_ymin();double [o]p_ymax())
3459             Types: (double)
3460              
3461             =for usage
3462              
3463             ($p_xmin, $p_xmax, $p_ymin, $p_ymax) = plgvpd();
3464             plgvpd($p_xmin, $p_xmax, $p_ymin, $p_ymax); # all arguments given
3465             $p_xmin->plgvpd($p_xmax, $p_ymin, $p_ymax);
3466              
3467             =for ref
3468              
3469             info not available
3470              
3471             =pod
3472              
3473             Broadcasts over its inputs.
3474             Can't use POSIX threads.
3475              
3476             =for bad
3477              
3478             C does not process bad values.
3479             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3480              
3481             =cut
3482              
3483              
3484              
3485              
3486             *plgvpd = \&PDL::plgvpd;
3487              
3488              
3489              
3490              
3491              
3492              
3493             =head2 plgvpw
3494              
3495             =for sig
3496              
3497             Signature: (double [o]p_xmin();double [o]p_xmax();double [o]p_ymin();double [o]p_ymax())
3498             Types: (double)
3499              
3500             =for usage
3501              
3502             ($p_xmin, $p_xmax, $p_ymin, $p_ymax) = plgvpw();
3503             plgvpw($p_xmin, $p_xmax, $p_ymin, $p_ymax); # all arguments given
3504             $p_xmin->plgvpw($p_xmax, $p_ymin, $p_ymax);
3505              
3506             =for ref
3507              
3508             info not available
3509              
3510             =pod
3511              
3512             Broadcasts over its inputs.
3513             Can't use POSIX threads.
3514              
3515             =for bad
3516              
3517             C does not process bad values.
3518             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3519              
3520             =cut
3521              
3522              
3523              
3524              
3525             *plgvpw = \&PDL::plgvpw;
3526              
3527              
3528              
3529              
3530              
3531              
3532             =head2 plgxax
3533              
3534             =for sig
3535              
3536             Signature: (int [o]p_digmax();int [o]p_digits())
3537             Types: (double)
3538              
3539             =for usage
3540              
3541             ($p_digmax, $p_digits) = plgxax();
3542             plgxax($p_digmax, $p_digits); # all arguments given
3543             $p_digmax->plgxax($p_digits);
3544              
3545             =for ref
3546              
3547             info not available
3548              
3549             =pod
3550              
3551             Broadcasts over its inputs.
3552             Can't use POSIX threads.
3553              
3554             =for bad
3555              
3556             C does not process bad values.
3557             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3558              
3559             =cut
3560              
3561              
3562              
3563              
3564             *plgxax = \&PDL::plgxax;
3565              
3566              
3567              
3568              
3569              
3570              
3571             =head2 plgyax
3572              
3573             =for sig
3574              
3575             Signature: (int [o]p_digmax();int [o]p_digits())
3576             Types: (double)
3577              
3578             =for usage
3579              
3580             ($p_digmax, $p_digits) = plgyax();
3581             plgyax($p_digmax, $p_digits); # all arguments given
3582             $p_digmax->plgyax($p_digits);
3583              
3584             =for ref
3585              
3586             info not available
3587              
3588             =pod
3589              
3590             Broadcasts over its inputs.
3591             Can't use POSIX threads.
3592              
3593             =for bad
3594              
3595             C does not process bad values.
3596             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3597              
3598             =cut
3599              
3600              
3601              
3602              
3603             *plgyax = \&PDL::plgyax;
3604              
3605              
3606              
3607              
3608              
3609              
3610             =head2 plgzax
3611              
3612             =for sig
3613              
3614             Signature: (int [o]p_digmax();int [o]p_digits())
3615             Types: (double)
3616              
3617             =for usage
3618              
3619             ($p_digmax, $p_digits) = plgzax();
3620             plgzax($p_digmax, $p_digits); # all arguments given
3621             $p_digmax->plgzax($p_digits);
3622              
3623             =for ref
3624              
3625             info not available
3626              
3627             =pod
3628              
3629             Broadcasts over its inputs.
3630             Can't use POSIX threads.
3631              
3632             =for bad
3633              
3634             C does not process bad values.
3635             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3636              
3637             =cut
3638              
3639              
3640              
3641              
3642             *plgzax = \&PDL::plgzax;
3643              
3644              
3645              
3646              
3647              
3648              
3649             =head2 pljoin
3650              
3651             =for sig
3652              
3653             Signature: (double xone();double yone();double xtwo();double ytwo())
3654             Types: (double)
3655              
3656             =for usage
3657              
3658             pljoin($xone, $yone, $xtwo, $ytwo); # all arguments given
3659             $xone->pljoin($yone, $xtwo, $ytwo); # method call
3660              
3661             =for ref
3662              
3663             info not available
3664              
3665             =pod
3666              
3667             Broadcasts over its inputs.
3668             Can't use POSIX threads.
3669              
3670             =for bad
3671              
3672             C does not process bad values.
3673             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3674              
3675             =cut
3676              
3677              
3678              
3679              
3680             *pljoin = \&PDL::pljoin;
3681              
3682              
3683              
3684              
3685              
3686              
3687             =head2 pllightsource
3688              
3689             =for sig
3690              
3691             Signature: (double x();double y();double z())
3692             Types: (double)
3693              
3694             =for usage
3695              
3696             pllightsource($x, $y, $z); # all arguments given
3697             $x->pllightsource($y, $z); # method call
3698              
3699             =for ref
3700              
3701             info not available
3702              
3703             =pod
3704              
3705             Broadcasts over its inputs.
3706             Can't use POSIX threads.
3707              
3708             =for bad
3709              
3710             C does not process bad values.
3711             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3712              
3713             =cut
3714              
3715              
3716              
3717              
3718             *pllightsource = \&PDL::pllightsource;
3719              
3720              
3721              
3722              
3723              
3724              
3725             =head2 pllsty
3726              
3727             =for sig
3728              
3729             Signature: (int lin())
3730             Types: (double)
3731              
3732             =for usage
3733              
3734             pllsty($lin); # all arguments given
3735             $lin->pllsty; # method call
3736              
3737             =for ref
3738              
3739             info not available
3740              
3741             =pod
3742              
3743             Broadcasts over its inputs.
3744             Can't use POSIX threads.
3745              
3746             =for bad
3747              
3748             C does not process bad values.
3749             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3750              
3751             =cut
3752              
3753              
3754              
3755              
3756             *pllsty = \&PDL::pllsty;
3757              
3758              
3759              
3760              
3761              
3762              
3763             =head2 plmtex
3764              
3765             =for sig
3766              
3767             Signature: (double disp();double pos();double just(); char *side;char *text)
3768             Types: (double)
3769              
3770             =for usage
3771              
3772             plmtex($disp, $pos, $just, $side, $text); # all arguments given
3773             $disp->plmtex($pos, $just, $side, $text); # method call
3774              
3775             =for ref
3776              
3777             info not available
3778              
3779             =pod
3780              
3781             Broadcasts over its inputs.
3782             Can't use POSIX threads.
3783              
3784             =for bad
3785              
3786             C does not process bad values.
3787             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3788              
3789             =cut
3790              
3791              
3792              
3793              
3794 764     764 0 2485847 sub PDL::plmtex { _reorder('plmtex', 'PDL::_plmtex_int', $standard_order, @_) }
3795              
3796              
3797              
3798             *plmtex = \&PDL::plmtex;
3799              
3800              
3801              
3802              
3803              
3804              
3805             =head2 plmtex3
3806              
3807             =for sig
3808              
3809             Signature: (double disp();double pos();double just(); char *side;char *text)
3810             Types: (double)
3811              
3812             =for usage
3813              
3814             plmtex3($disp, $pos, $just, $side, $text); # all arguments given
3815             $disp->plmtex3($pos, $just, $side, $text); # method call
3816              
3817             =for ref
3818              
3819             info not available
3820              
3821             =pod
3822              
3823             Broadcasts over its inputs.
3824             Can't use POSIX threads.
3825              
3826             =for bad
3827              
3828             C does not process bad values.
3829             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3830              
3831             =cut
3832              
3833              
3834              
3835              
3836 12     12 0 82 sub PDL::plmtex3 { _reorder('plmtex3', 'PDL::_plmtex3_int', $standard_order, @_) }
3837              
3838              
3839              
3840             *plmtex3 = \&PDL::plmtex3;
3841              
3842              
3843              
3844              
3845              
3846              
3847             =head2 plpat
3848              
3849             =for sig
3850              
3851             Signature: (int nlin();int inc(dima);int del(dima))
3852             Types: (double)
3853              
3854             =for usage
3855              
3856             plpat($nlin, $inc, $del); # all arguments given
3857             $nlin->plpat($inc, $del); # method call
3858              
3859             =for ref
3860              
3861             info not available
3862              
3863             =pod
3864              
3865             Broadcasts over its inputs.
3866             Can't use POSIX threads.
3867              
3868             =for bad
3869              
3870             C does not process bad values.
3871             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3872              
3873             =cut
3874              
3875              
3876              
3877              
3878             *plpat = \&PDL::plpat;
3879              
3880              
3881              
3882              
3883              
3884              
3885             =head2 plprec
3886              
3887             =for sig
3888              
3889             Signature: (int setp();int prec())
3890             Types: (double)
3891              
3892             =for usage
3893              
3894             plprec($setp, $prec); # all arguments given
3895             $setp->plprec($prec); # method call
3896              
3897             =for ref
3898              
3899             info not available
3900              
3901             =pod
3902              
3903             Broadcasts over its inputs.
3904             Can't use POSIX threads.
3905              
3906             =for bad
3907              
3908             C does not process bad values.
3909             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3910              
3911             =cut
3912              
3913              
3914              
3915              
3916             *plprec = \&PDL::plprec;
3917              
3918              
3919              
3920              
3921              
3922              
3923             =head2 plpsty
3924              
3925             =for sig
3926              
3927             Signature: (int patt())
3928             Types: (double)
3929              
3930             =for usage
3931              
3932             plpsty($patt); # all arguments given
3933             $patt->plpsty; # method call
3934              
3935             =for ref
3936              
3937             info not available
3938              
3939             =pod
3940              
3941             Broadcasts over its inputs.
3942             Can't use POSIX threads.
3943              
3944             =for bad
3945              
3946             C does not process bad values.
3947             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3948              
3949             =cut
3950              
3951              
3952              
3953              
3954             *plpsty = \&PDL::plpsty;
3955              
3956              
3957              
3958              
3959              
3960              
3961             =head2 plptex
3962              
3963             =for sig
3964              
3965             Signature: (double x();double y();double dx();double dy();double just(); char *text)
3966             Types: (double)
3967              
3968             =for usage
3969              
3970             plptex($x, $y, $dx, $dy, $just, $text); # all arguments given
3971             $x->plptex($y, $dx, $dy, $just, $text); # method call
3972              
3973             =for ref
3974              
3975             info not available
3976              
3977             =pod
3978              
3979             Broadcasts over its inputs.
3980             Can't use POSIX threads.
3981              
3982             =for bad
3983              
3984             C does not process bad values.
3985             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
3986              
3987             =cut
3988              
3989              
3990              
3991              
3992             *plptex = \&PDL::plptex;
3993              
3994              
3995              
3996              
3997              
3998              
3999             =head2 plptex3
4000              
4001             =for sig
4002              
4003             Signature: (double x();double y();double z();double dx();double dy();double dz();double sx();double sy();double sz();double just(); char *text)
4004             Types: (double)
4005              
4006             =for usage
4007              
4008             plptex3($x, $y, $z, $dx, $dy, $dz, $sx, $sy, $sz, $just, $text); # all arguments given
4009             $x->plptex3($y, $z, $dx, $dy, $dz, $sx, $sy, $sz, $just, $text); # method call
4010              
4011             =for ref
4012              
4013             info not available
4014              
4015             =pod
4016              
4017             Broadcasts over its inputs.
4018             Can't use POSIX threads.
4019              
4020             =for bad
4021              
4022             C does not process bad values.
4023             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4024              
4025             =cut
4026              
4027              
4028              
4029              
4030             *plptex3 = \&PDL::plptex3;
4031              
4032              
4033              
4034              
4035              
4036              
4037             =head2 plschr
4038              
4039             =for sig
4040              
4041             Signature: (double def();double scale())
4042             Types: (double)
4043              
4044             =for usage
4045              
4046             plschr($def, $scale); # all arguments given
4047             $def->plschr($scale); # method call
4048              
4049             =for ref
4050              
4051             info not available
4052              
4053             =pod
4054              
4055             Broadcasts over its inputs.
4056             Can't use POSIX threads.
4057              
4058             =for bad
4059              
4060             C does not process bad values.
4061             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4062              
4063             =cut
4064              
4065              
4066              
4067              
4068             *plschr = \&PDL::plschr;
4069              
4070              
4071              
4072              
4073              
4074              
4075             =head2 plscmap0n
4076              
4077             =for sig
4078              
4079             Signature: (int ncolzero())
4080             Types: (double)
4081              
4082             =for usage
4083              
4084             plscmap0n($ncolzero); # all arguments given
4085             $ncolzero->plscmap0n; # method call
4086              
4087             =for ref
4088              
4089             info not available
4090              
4091             =pod
4092              
4093             Broadcasts over its inputs.
4094             Can't use POSIX threads.
4095              
4096             =for bad
4097              
4098             C does not process bad values.
4099             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4100              
4101             =cut
4102              
4103              
4104              
4105              
4106             *plscmap0n = \&PDL::plscmap0n;
4107              
4108              
4109              
4110              
4111              
4112              
4113             =head2 plscmap1n
4114              
4115             =for sig
4116              
4117             Signature: (int ncolone())
4118             Types: (double)
4119              
4120             =for usage
4121              
4122             plscmap1n($ncolone); # all arguments given
4123             $ncolone->plscmap1n; # method call
4124              
4125             =for ref
4126              
4127             info not available
4128              
4129             =pod
4130              
4131             Broadcasts over its inputs.
4132             Can't use POSIX threads.
4133              
4134             =for bad
4135              
4136             C does not process bad values.
4137             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4138              
4139             =cut
4140              
4141              
4142              
4143              
4144             *plscmap1n = \&PDL::plscmap1n;
4145              
4146              
4147              
4148              
4149              
4150              
4151             =head2 plscol0
4152              
4153             =for sig
4154              
4155             Signature: (int icolzero();int r();int g();int b())
4156             Types: (double)
4157              
4158             =for usage
4159              
4160             plscol0($icolzero, $r, $g, $b); # all arguments given
4161             $icolzero->plscol0($r, $g, $b); # method call
4162              
4163             =for ref
4164              
4165             info not available
4166              
4167             =pod
4168              
4169             Broadcasts over its inputs.
4170             Can't use POSIX threads.
4171              
4172             =for bad
4173              
4174             C does not process bad values.
4175             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4176              
4177             =cut
4178              
4179              
4180              
4181              
4182             *plscol0 = \&PDL::plscol0;
4183              
4184              
4185              
4186              
4187              
4188              
4189             =head2 plscolbg
4190              
4191             =for sig
4192              
4193             Signature: (int r();int g();int b())
4194             Types: (double)
4195              
4196             =for usage
4197              
4198             plscolbg($r, $g, $b); # all arguments given
4199             $r->plscolbg($g, $b); # method call
4200              
4201             =for ref
4202              
4203             info not available
4204              
4205             =pod
4206              
4207             Broadcasts over its inputs.
4208             Can't use POSIX threads.
4209              
4210             =for bad
4211              
4212             C does not process bad values.
4213             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4214              
4215             =cut
4216              
4217              
4218              
4219              
4220             *plscolbg = \&PDL::plscolbg;
4221              
4222              
4223              
4224              
4225              
4226              
4227             =head2 plscolor
4228              
4229             =for sig
4230              
4231             Signature: (int color())
4232             Types: (double)
4233              
4234             =for usage
4235              
4236             plscolor($color); # all arguments given
4237             $color->plscolor; # method call
4238              
4239             =for ref
4240              
4241             info not available
4242              
4243             =pod
4244              
4245             Broadcasts over its inputs.
4246             Can't use POSIX threads.
4247              
4248             =for bad
4249              
4250             C does not process bad values.
4251             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4252              
4253             =cut
4254              
4255              
4256              
4257              
4258             *plscolor = \&PDL::plscolor;
4259              
4260              
4261              
4262              
4263              
4264              
4265             =head2 plscompression
4266              
4267             =for sig
4268              
4269             Signature: (int compression())
4270             Types: (double)
4271              
4272             =for usage
4273              
4274             plscompression($compression); # all arguments given
4275             $compression->plscompression; # method call
4276              
4277             =for ref
4278              
4279             info not available
4280              
4281             =pod
4282              
4283             Broadcasts over its inputs.
4284             Can't use POSIX threads.
4285              
4286             =for bad
4287              
4288             C does not process bad values.
4289             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4290              
4291             =cut
4292              
4293              
4294              
4295              
4296             *plscompression = \&PDL::plscompression;
4297              
4298              
4299              
4300              
4301              
4302             #line 3109 "plplot.pd"
4303              
4304             =head2 plgDevs
4305              
4306             =for sig
4307              
4308             $devices = plgDevs ()
4309              
4310             =for ref
4311              
4312             Returns a HashRef of all device names (key)
4313             and their menu strings (value).
4314              
4315             =cut
4316              
4317             #line 3109 "plplot.pd"
4318              
4319             =head2 plgFileDevs
4320              
4321             =for sig
4322              
4323             $devices = plgFileDevs ()
4324              
4325             =for ref
4326              
4327             Returns a HashRef of file-oriented device names (key)
4328             and their menu strings (value).
4329              
4330             =cut
4331             #line 4332 "PLplot.pm"
4332              
4333              
4334             =head2 plsdidev
4335              
4336             =for sig
4337              
4338             Signature: (double mar();double aspect();double jx();double jy())
4339             Types: (double)
4340              
4341             =for usage
4342              
4343             plsdidev($mar, $aspect, $jx, $jy); # all arguments given
4344             $mar->plsdidev($aspect, $jx, $jy); # method call
4345              
4346             =for ref
4347              
4348             info not available
4349              
4350             =pod
4351              
4352             Broadcasts over its inputs.
4353             Can't use POSIX threads.
4354              
4355             =for bad
4356              
4357             C does not process bad values.
4358             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4359              
4360             =cut
4361              
4362              
4363              
4364              
4365             *plsdidev = \&PDL::plsdidev;
4366              
4367              
4368              
4369              
4370              
4371              
4372             =head2 plsdimap
4373              
4374             =for sig
4375              
4376             Signature: (int dimxmin();int dimxmax();int dimymin();int dimymax();double dimxpmm();double dimypmm())
4377             Types: (double)
4378              
4379             =for usage
4380              
4381             plsdimap($dimxmin, $dimxmax, $dimymin, $dimymax, $dimxpmm, $dimypmm); # all arguments given
4382             $dimxmin->plsdimap($dimxmax, $dimymin, $dimymax, $dimxpmm, $dimypmm); # method call
4383              
4384             =for ref
4385              
4386             info not available
4387              
4388             =pod
4389              
4390             Broadcasts over its inputs.
4391             Can't use POSIX threads.
4392              
4393             =for bad
4394              
4395             C does not process bad values.
4396             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4397              
4398             =cut
4399              
4400              
4401              
4402              
4403             *plsdimap = \&PDL::plsdimap;
4404              
4405              
4406              
4407              
4408              
4409              
4410             =head2 plsdiori
4411              
4412             =for sig
4413              
4414             Signature: (double rot())
4415             Types: (double)
4416              
4417             =for usage
4418              
4419             plsdiori($rot); # all arguments given
4420             $rot->plsdiori; # method call
4421              
4422             =for ref
4423              
4424             info not available
4425              
4426             =pod
4427              
4428             Broadcasts over its inputs.
4429             Can't use POSIX threads.
4430              
4431             =for bad
4432              
4433             C does not process bad values.
4434             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4435              
4436             =cut
4437              
4438              
4439              
4440              
4441             *plsdiori = \&PDL::plsdiori;
4442              
4443              
4444              
4445              
4446              
4447              
4448             =head2 plsdiplt
4449              
4450             =for sig
4451              
4452             Signature: (double xmin();double ymin();double xmax();double ymax())
4453             Types: (double)
4454              
4455             =for usage
4456              
4457             plsdiplt($xmin, $ymin, $xmax, $ymax); # all arguments given
4458             $xmin->plsdiplt($ymin, $xmax, $ymax); # method call
4459              
4460             =for ref
4461              
4462             info not available
4463              
4464             =pod
4465              
4466             Broadcasts over its inputs.
4467             Can't use POSIX threads.
4468              
4469             =for bad
4470              
4471             C does not process bad values.
4472             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4473              
4474             =cut
4475              
4476              
4477              
4478              
4479             *plsdiplt = \&PDL::plsdiplt;
4480              
4481              
4482              
4483              
4484              
4485              
4486             =head2 plsdiplz
4487              
4488             =for sig
4489              
4490             Signature: (double xmin();double ymin();double xmax();double ymax())
4491             Types: (double)
4492              
4493             =for usage
4494              
4495             plsdiplz($xmin, $ymin, $xmax, $ymax); # all arguments given
4496             $xmin->plsdiplz($ymin, $xmax, $ymax); # method call
4497              
4498             =for ref
4499              
4500             info not available
4501              
4502             =pod
4503              
4504             Broadcasts over its inputs.
4505             Can't use POSIX threads.
4506              
4507             =for bad
4508              
4509             C does not process bad values.
4510             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4511              
4512             =cut
4513              
4514              
4515              
4516              
4517             *plsdiplz = \&PDL::plsdiplz;
4518              
4519              
4520              
4521              
4522              
4523              
4524             =head2 pl_setcontlabelparam
4525              
4526             =for sig
4527              
4528             Signature: (double offset();double size();double spacing();int active())
4529             Types: (double)
4530              
4531             =for usage
4532              
4533             pl_setcontlabelparam($offset, $size, $spacing, $active); # all arguments given
4534             $offset->pl_setcontlabelparam($size, $spacing, $active); # method call
4535              
4536             =for ref
4537              
4538             info not available
4539              
4540             =pod
4541              
4542             Broadcasts over its inputs.
4543             Can't use POSIX threads.
4544              
4545             =for bad
4546              
4547             C does not process bad values.
4548             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4549              
4550             =cut
4551              
4552              
4553              
4554              
4555             *pl_setcontlabelparam = \&PDL::pl_setcontlabelparam;
4556              
4557              
4558              
4559              
4560              
4561              
4562             =head2 pl_setcontlabelformat
4563              
4564             =for sig
4565              
4566             Signature: (int lexp();int sigdig())
4567             Types: (double)
4568              
4569             =for usage
4570              
4571             pl_setcontlabelformat($lexp, $sigdig); # all arguments given
4572             $lexp->pl_setcontlabelformat($sigdig); # method call
4573              
4574             =for ref
4575              
4576             info not available
4577              
4578             =pod
4579              
4580             Broadcasts over its inputs.
4581             Can't use POSIX threads.
4582              
4583             =for bad
4584              
4585             C does not process bad values.
4586             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4587              
4588             =cut
4589              
4590              
4591              
4592              
4593             *pl_setcontlabelformat = \&PDL::pl_setcontlabelformat;
4594              
4595              
4596              
4597              
4598              
4599              
4600             =head2 plsfam
4601              
4602             =for sig
4603              
4604             Signature: (int fam();int num();int bmax())
4605             Types: (double)
4606              
4607             =for usage
4608              
4609             plsfam($fam, $num, $bmax); # all arguments given
4610             $fam->plsfam($num, $bmax); # method call
4611              
4612             =for ref
4613              
4614             info not available
4615              
4616             =pod
4617              
4618             Broadcasts over its inputs.
4619             Can't use POSIX threads.
4620              
4621             =for bad
4622              
4623             C does not process bad values.
4624             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4625              
4626             =cut
4627              
4628              
4629              
4630              
4631             *plsfam = \&PDL::plsfam;
4632              
4633              
4634              
4635              
4636              
4637              
4638             =head2 plsmaj
4639              
4640             =for sig
4641              
4642             Signature: (double def();double scale())
4643             Types: (double)
4644              
4645             =for usage
4646              
4647             plsmaj($def, $scale); # all arguments given
4648             $def->plsmaj($scale); # method call
4649              
4650             =for ref
4651              
4652             info not available
4653              
4654             =pod
4655              
4656             Broadcasts over its inputs.
4657             Can't use POSIX threads.
4658              
4659             =for bad
4660              
4661             C does not process bad values.
4662             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4663              
4664             =cut
4665              
4666              
4667              
4668              
4669             *plsmaj = \&PDL::plsmaj;
4670              
4671              
4672              
4673              
4674              
4675              
4676             =head2 plsmin
4677              
4678             =for sig
4679              
4680             Signature: (double def();double scale())
4681             Types: (double)
4682              
4683             =for usage
4684              
4685             plsmin($def, $scale); # all arguments given
4686             $def->plsmin($scale); # method call
4687              
4688             =for ref
4689              
4690             info not available
4691              
4692             =pod
4693              
4694             Broadcasts over its inputs.
4695             Can't use POSIX threads.
4696              
4697             =for bad
4698              
4699             C does not process bad values.
4700             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4701              
4702             =cut
4703              
4704              
4705              
4706              
4707             *plsmin = \&PDL::plsmin;
4708              
4709              
4710              
4711              
4712              
4713              
4714             =head2 plsori
4715              
4716             =for sig
4717              
4718             Signature: (int ori())
4719             Types: (double)
4720              
4721             =for usage
4722              
4723             plsori($ori); # all arguments given
4724             $ori->plsori; # method call
4725              
4726             =for ref
4727              
4728             info not available
4729              
4730             =pod
4731              
4732             Broadcasts over its inputs.
4733             Can't use POSIX threads.
4734              
4735             =for bad
4736              
4737             C does not process bad values.
4738             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4739              
4740             =cut
4741              
4742              
4743              
4744              
4745             *plsori = \&PDL::plsori;
4746              
4747              
4748              
4749              
4750              
4751              
4752             =head2 plspage
4753              
4754             =for sig
4755              
4756             Signature: (double xp();double yp();int xleng();int yleng();int xoff();int yoff())
4757             Types: (double)
4758              
4759             =for usage
4760              
4761             plspage($xp, $yp, $xleng, $yleng, $xoff, $yoff); # all arguments given
4762             $xp->plspage($yp, $xleng, $yleng, $xoff, $yoff); # method call
4763              
4764             =for ref
4765              
4766             info not available
4767              
4768             =pod
4769              
4770             Broadcasts over its inputs.
4771             Can't use POSIX threads.
4772              
4773             =for bad
4774              
4775             C does not process bad values.
4776             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4777              
4778             =cut
4779              
4780              
4781              
4782              
4783             *plspage = \&PDL::plspage;
4784              
4785              
4786              
4787              
4788              
4789              
4790             =head2 plspause
4791              
4792             =for sig
4793              
4794             Signature: (int pause())
4795             Types: (double)
4796              
4797             =for usage
4798              
4799             plspause($pause); # all arguments given
4800             $pause->plspause; # method call
4801              
4802             =for ref
4803              
4804             info not available
4805              
4806             =pod
4807              
4808             Broadcasts over its inputs.
4809             Can't use POSIX threads.
4810              
4811             =for bad
4812              
4813             C does not process bad values.
4814             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4815              
4816             =cut
4817              
4818              
4819              
4820              
4821             *plspause = \&PDL::plspause;
4822              
4823              
4824              
4825              
4826              
4827              
4828             =head2 plsstrm
4829              
4830             =for sig
4831              
4832             Signature: (int strm())
4833             Types: (double)
4834              
4835             =for usage
4836              
4837             plsstrm($strm); # all arguments given
4838             $strm->plsstrm; # method call
4839              
4840             =for ref
4841              
4842             info not available
4843              
4844             =pod
4845              
4846             Broadcasts over its inputs.
4847             Can't use POSIX threads.
4848              
4849             =for bad
4850              
4851             C does not process bad values.
4852             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4853              
4854             =cut
4855              
4856              
4857              
4858              
4859             *plsstrm = \&PDL::plsstrm;
4860              
4861              
4862              
4863              
4864              
4865              
4866             =head2 plssub
4867              
4868             =for sig
4869              
4870             Signature: (int nx();int ny())
4871             Types: (double)
4872              
4873             =for usage
4874              
4875             plssub($nx, $ny); # all arguments given
4876             $nx->plssub($ny); # method call
4877              
4878             =for ref
4879              
4880             info not available
4881              
4882             =pod
4883              
4884             Broadcasts over its inputs.
4885             Can't use POSIX threads.
4886              
4887             =for bad
4888              
4889             C does not process bad values.
4890             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4891              
4892             =cut
4893              
4894              
4895              
4896              
4897             *plssub = \&PDL::plssub;
4898              
4899              
4900              
4901              
4902              
4903              
4904             =head2 plssym
4905              
4906             =for sig
4907              
4908             Signature: (double def();double scale())
4909             Types: (double)
4910              
4911             =for usage
4912              
4913             plssym($def, $scale); # all arguments given
4914             $def->plssym($scale); # method call
4915              
4916             =for ref
4917              
4918             info not available
4919              
4920             =pod
4921              
4922             Broadcasts over its inputs.
4923             Can't use POSIX threads.
4924              
4925             =for bad
4926              
4927             C does not process bad values.
4928             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4929              
4930             =cut
4931              
4932              
4933              
4934              
4935             *plssym = \&PDL::plssym;
4936              
4937              
4938              
4939              
4940              
4941              
4942             =head2 plstar
4943              
4944             =for sig
4945              
4946             Signature: (int nx();int ny())
4947             Types: (double)
4948              
4949             =for usage
4950              
4951             plstar($nx, $ny); # all arguments given
4952             $nx->plstar($ny); # method call
4953              
4954             =for ref
4955              
4956             info not available
4957              
4958             =pod
4959              
4960             Broadcasts over its inputs.
4961             Can't use POSIX threads.
4962              
4963             =for bad
4964              
4965             C does not process bad values.
4966             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
4967              
4968             =cut
4969              
4970              
4971              
4972              
4973             *plstar = \&PDL::plstar;
4974              
4975              
4976              
4977              
4978              
4979              
4980             =head2 plstart
4981              
4982             =for sig
4983              
4984             Signature: (int nx();int ny(); char *devname)
4985             Types: (double)
4986              
4987             =for usage
4988              
4989             plstart($nx, $ny, $devname); # all arguments given
4990             $nx->plstart($ny, $devname); # method call
4991              
4992             =for ref
4993              
4994             info not available
4995              
4996             =pod
4997              
4998             Broadcasts over its inputs.
4999             Can't use POSIX threads.
5000              
5001             =for bad
5002              
5003             C does not process bad values.
5004             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5005              
5006             =cut
5007              
5008              
5009              
5010              
5011 0     0 0 0 sub PDL::plstart { _reorder('plstart', 'PDL::_plstart_int', $standard_order, @_) }
5012              
5013              
5014              
5015             *plstart = \&PDL::plstart;
5016              
5017              
5018              
5019              
5020              
5021              
5022             =head2 plstripa
5023              
5024             =for sig
5025              
5026             Signature: (int id();int pen();double x();double y())
5027             Types: (double)
5028              
5029             =for usage
5030              
5031             plstripa($id, $pen, $x, $y); # all arguments given
5032             $id->plstripa($pen, $x, $y); # method call
5033              
5034             =for ref
5035              
5036             info not available
5037              
5038             =pod
5039              
5040             Broadcasts over its inputs.
5041             Can't use POSIX threads.
5042              
5043             =for bad
5044              
5045             C does not process bad values.
5046             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5047              
5048             =cut
5049              
5050              
5051              
5052              
5053             *plstripa = \&PDL::plstripa;
5054              
5055              
5056              
5057              
5058              
5059              
5060             =head2 plstripd
5061              
5062             =for sig
5063              
5064             Signature: (int id())
5065             Types: (double)
5066              
5067             =for usage
5068              
5069             plstripd($id); # all arguments given
5070             $id->plstripd; # method call
5071              
5072             =for ref
5073              
5074             info not available
5075              
5076             =pod
5077              
5078             Broadcasts over its inputs.
5079             Can't use POSIX threads.
5080              
5081             =for bad
5082              
5083             C does not process bad values.
5084             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5085              
5086             =cut
5087              
5088              
5089              
5090              
5091             *plstripd = \&PDL::plstripd;
5092              
5093              
5094              
5095              
5096              
5097              
5098             =head2 plsvpa
5099              
5100             =for sig
5101              
5102             Signature: (double xmin();double xmax();double ymin();double ymax())
5103             Types: (double)
5104              
5105             =for usage
5106              
5107             plsvpa($xmin, $xmax, $ymin, $ymax); # all arguments given
5108             $xmin->plsvpa($xmax, $ymin, $ymax); # method call
5109              
5110             =for ref
5111              
5112             info not available
5113              
5114             =pod
5115              
5116             Broadcasts over its inputs.
5117             Can't use POSIX threads.
5118              
5119             =for bad
5120              
5121             C does not process bad values.
5122             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5123              
5124             =cut
5125              
5126              
5127              
5128              
5129             *plsvpa = \&PDL::plsvpa;
5130              
5131              
5132              
5133              
5134              
5135              
5136             =head2 plsxax
5137              
5138             =for sig
5139              
5140             Signature: (int digmax();int digits())
5141             Types: (double)
5142              
5143             =for usage
5144              
5145             plsxax($digmax, $digits); # all arguments given
5146             $digmax->plsxax($digits); # method call
5147              
5148             =for ref
5149              
5150             info not available
5151              
5152             =pod
5153              
5154             Broadcasts over its inputs.
5155             Can't use POSIX threads.
5156              
5157             =for bad
5158              
5159             C does not process bad values.
5160             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5161              
5162             =cut
5163              
5164              
5165              
5166              
5167             *plsxax = \&PDL::plsxax;
5168              
5169              
5170              
5171              
5172              
5173              
5174             =head2 plsxwin
5175              
5176             =for sig
5177              
5178             Signature: (int window_id())
5179             Types: (double)
5180              
5181             =for usage
5182              
5183             plsxwin($window_id); # all arguments given
5184             $window_id->plsxwin; # method call
5185              
5186             =for ref
5187              
5188             info not available
5189              
5190             =pod
5191              
5192             Broadcasts over its inputs.
5193             Can't use POSIX threads.
5194              
5195             =for bad
5196              
5197             C does not process bad values.
5198             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5199              
5200             =cut
5201              
5202              
5203              
5204              
5205             *plsxwin = \&PDL::plsxwin;
5206              
5207              
5208              
5209              
5210              
5211              
5212             =head2 plsyax
5213              
5214             =for sig
5215              
5216             Signature: (int digmax();int digits())
5217             Types: (double)
5218              
5219             =for usage
5220              
5221             plsyax($digmax, $digits); # all arguments given
5222             $digmax->plsyax($digits); # method call
5223              
5224             =for ref
5225              
5226             info not available
5227              
5228             =pod
5229              
5230             Broadcasts over its inputs.
5231             Can't use POSIX threads.
5232              
5233             =for bad
5234              
5235             C does not process bad values.
5236             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5237              
5238             =cut
5239              
5240              
5241              
5242              
5243             *plsyax = \&PDL::plsyax;
5244              
5245              
5246              
5247              
5248              
5249              
5250             =head2 plszax
5251              
5252             =for sig
5253              
5254             Signature: (int digmax();int digits())
5255             Types: (double)
5256              
5257             =for usage
5258              
5259             plszax($digmax, $digits); # all arguments given
5260             $digmax->plszax($digits); # method call
5261              
5262             =for ref
5263              
5264             info not available
5265              
5266             =pod
5267              
5268             Broadcasts over its inputs.
5269             Can't use POSIX threads.
5270              
5271             =for bad
5272              
5273             C does not process bad values.
5274             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5275              
5276             =cut
5277              
5278              
5279              
5280              
5281             *plszax = \&PDL::plszax;
5282              
5283              
5284              
5285              
5286              
5287              
5288             =head2 plvasp
5289              
5290             =for sig
5291              
5292             Signature: (double aspect())
5293             Types: (double)
5294              
5295             =for usage
5296              
5297             plvasp($aspect); # all arguments given
5298             $aspect->plvasp; # method call
5299              
5300             =for ref
5301              
5302             info not available
5303              
5304             =pod
5305              
5306             Broadcasts over its inputs.
5307             Can't use POSIX threads.
5308              
5309             =for bad
5310              
5311             C does not process bad values.
5312             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5313              
5314             =cut
5315              
5316              
5317              
5318              
5319             *plvasp = \&PDL::plvasp;
5320              
5321              
5322              
5323              
5324              
5325              
5326             =head2 plvpas
5327              
5328             =for sig
5329              
5330             Signature: (double xmin();double xmax();double ymin();double ymax();double aspect())
5331             Types: (double)
5332              
5333             =for usage
5334              
5335             plvpas($xmin, $xmax, $ymin, $ymax, $aspect); # all arguments given
5336             $xmin->plvpas($xmax, $ymin, $ymax, $aspect); # method call
5337              
5338             =for ref
5339              
5340             info not available
5341              
5342             =pod
5343              
5344             Broadcasts over its inputs.
5345             Can't use POSIX threads.
5346              
5347             =for bad
5348              
5349             C does not process bad values.
5350             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5351              
5352             =cut
5353              
5354              
5355              
5356              
5357             *plvpas = \&PDL::plvpas;
5358              
5359              
5360              
5361              
5362              
5363              
5364             =head2 plvpor
5365              
5366             =for sig
5367              
5368             Signature: (double xmin();double xmax();double ymin();double ymax())
5369             Types: (double)
5370              
5371             =for usage
5372              
5373             plvpor($xmin, $xmax, $ymin, $ymax); # all arguments given
5374             $xmin->plvpor($xmax, $ymin, $ymax); # method call
5375              
5376             =for ref
5377              
5378             info not available
5379              
5380             =pod
5381              
5382             Broadcasts over its inputs.
5383             Can't use POSIX threads.
5384              
5385             =for bad
5386              
5387             C does not process bad values.
5388             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5389              
5390             =cut
5391              
5392              
5393              
5394              
5395             *plvpor = \&PDL::plvpor;
5396              
5397              
5398              
5399              
5400              
5401              
5402             =head2 plw3d
5403              
5404             =for sig
5405              
5406             Signature: (double basex();double basey();double height();double xminzero();double xmaxzero();double yminzero();double ymaxzero();double zminzero();double zmaxzero();double alt();double az())
5407             Types: (double)
5408              
5409             =for usage
5410              
5411             plw3d($basex, $basey, $height, $xminzero, $xmaxzero, $yminzero, $ymaxzero, $zminzero, $zmaxzero, $alt, $az); # all arguments given
5412             $basex->plw3d($basey, $height, $xminzero, $xmaxzero, $yminzero, $ymaxzero, $zminzero, $zmaxzero, $alt, $az); # method call
5413              
5414             =for ref
5415              
5416             info not available
5417              
5418             =pod
5419              
5420             Broadcasts over its inputs.
5421             Can't use POSIX threads.
5422              
5423             =for bad
5424              
5425             C does not process bad values.
5426             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5427              
5428             =cut
5429              
5430              
5431              
5432              
5433             *plw3d = \&PDL::plw3d;
5434              
5435              
5436              
5437              
5438              
5439              
5440             =head2 plwidth
5441              
5442             =for sig
5443              
5444             Signature: (int width())
5445             Types: (double)
5446              
5447             =for usage
5448              
5449             plwidth($width); # all arguments given
5450             $width->plwidth; # method call
5451              
5452             =for ref
5453              
5454             info not available
5455              
5456             =pod
5457              
5458             Broadcasts over its inputs.
5459             Can't use POSIX threads.
5460              
5461             =for bad
5462              
5463             C does not process bad values.
5464             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5465              
5466             =cut
5467              
5468              
5469              
5470              
5471             *plwidth = \&PDL::plwidth;
5472              
5473              
5474              
5475              
5476              
5477              
5478             =head2 plwind
5479              
5480             =for sig
5481              
5482             Signature: (double xmin();double xmax();double ymin();double ymax())
5483             Types: (double)
5484              
5485             =for usage
5486              
5487             plwind($xmin, $xmax, $ymin, $ymax); # all arguments given
5488             $xmin->plwind($xmax, $ymin, $ymax); # method call
5489              
5490             =for ref
5491              
5492             info not available
5493              
5494             =pod
5495              
5496             Broadcasts over its inputs.
5497             Can't use POSIX threads.
5498              
5499             =for bad
5500              
5501             C does not process bad values.
5502             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5503              
5504             =cut
5505              
5506              
5507              
5508              
5509             *plwind = \&PDL::plwind;
5510              
5511              
5512              
5513              
5514              
5515              
5516             =head2 plP_gpixmm
5517              
5518             =for sig
5519              
5520             Signature: (double p_x(dima);double p_y(dima))
5521             Types: (double)
5522              
5523             =for usage
5524              
5525             plP_gpixmm($p_x, $p_y); # all arguments given
5526             $p_x->plP_gpixmm($p_y); # method call
5527              
5528             =for ref
5529              
5530             info not available
5531              
5532             =pod
5533              
5534             Broadcasts over its inputs.
5535             Can't use POSIX threads.
5536              
5537             =for bad
5538              
5539             C does not process bad values.
5540             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5541              
5542             =cut
5543              
5544              
5545              
5546              
5547             *plP_gpixmm = \&PDL::plP_gpixmm;
5548              
5549              
5550              
5551              
5552              
5553              
5554             =head2 plscolbga
5555              
5556             =for sig
5557              
5558             Signature: (int r();int g();int b();double a())
5559             Types: (double)
5560              
5561             =for usage
5562              
5563             plscolbga($r, $g, $b, $a); # all arguments given
5564             $r->plscolbga($g, $b, $a); # method call
5565              
5566             =for ref
5567              
5568             info not available
5569              
5570             =pod
5571              
5572             Broadcasts over its inputs.
5573             Can't use POSIX threads.
5574              
5575             =for bad
5576              
5577             C does not process bad values.
5578             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5579              
5580             =cut
5581              
5582              
5583              
5584              
5585             *plscolbga = \&PDL::plscolbga;
5586              
5587              
5588              
5589              
5590              
5591              
5592             =head2 plscol0a
5593              
5594             =for sig
5595              
5596             Signature: (int icolzero();int r();int g();int b();double a())
5597             Types: (double)
5598              
5599             =for usage
5600              
5601             plscol0a($icolzero, $r, $g, $b, $a); # all arguments given
5602             $icolzero->plscol0a($r, $g, $b, $a); # method call
5603              
5604             =for ref
5605              
5606             info not available
5607              
5608             =pod
5609              
5610             Broadcasts over its inputs.
5611             Can't use POSIX threads.
5612              
5613             =for bad
5614              
5615             C does not process bad values.
5616             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5617              
5618             =cut
5619              
5620              
5621              
5622              
5623             *plscol0a = \&PDL::plscol0a;
5624              
5625              
5626              
5627              
5628              
5629              
5630             =head2 plline
5631              
5632             =for sig
5633              
5634             Signature: (x(n); y(n))
5635             Types: (double)
5636              
5637             =for ref
5638              
5639             Draws line segments along (x1,y1)->(x2,y2)->(x3,y3)->...
5640              
5641             =for bad
5642              
5643             If the nth value of either x or y are bad, then it will be skipped, breaking
5644             the line. In this way, you can specify multiple line segments with a single
5645             pair of x and y ndarrays.
5646              
5647             The usage is straight-forward:
5648              
5649             =for usage
5650              
5651             plline($x, $y);
5652              
5653             For example:
5654              
5655             =for example
5656              
5657             # Draw a sine wave
5658             $x = sequence(100)/10;
5659             $y = sin($x);
5660              
5661             # Draws the sine wave:
5662             plline($x, $y);
5663              
5664             # Set values above 3/4 to 'bad', effectively drawing a bunch of detached,
5665             # capped waves
5666             $y->setbadif($y > 3/4);
5667             plline($x, $y);
5668              
5669             =pod
5670              
5671             Broadcasts over its inputs.
5672             Can't use POSIX threads.
5673              
5674             =for bad
5675              
5676             C processes bad values.
5677             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5678              
5679             =cut
5680              
5681              
5682              
5683              
5684             *plline = \&PDL::plline;
5685              
5686              
5687              
5688              
5689              
5690              
5691             =head2 plpath
5692              
5693             =for sig
5694              
5695             Signature: (int n(); x1(); x2(); y1(); y2())
5696             Types: (double)
5697              
5698             =for usage
5699              
5700             plpath($n, $x1, $x2, $y1, $y2); # all arguments given
5701             $n->plpath($x1, $x2, $y1, $y2); # method call
5702              
5703             =for ref
5704              
5705             info not available
5706              
5707             =pod
5708              
5709             Broadcasts over its inputs.
5710             Can't use POSIX threads.
5711              
5712             =for bad
5713              
5714             C ignores the bad-value flag of the input ndarrays.
5715             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5716              
5717             =cut
5718              
5719              
5720              
5721              
5722             *plpath = \&PDL::plpath;
5723              
5724              
5725              
5726              
5727              
5728              
5729             =head2 plcolorpoints
5730              
5731             =for sig
5732              
5733             Signature: (x(n); y(n); z(n); int sym(); minz(); maxz())
5734             Types: (double)
5735              
5736             =for ref
5737              
5738             PDL-specific: Implements what amounts to a threaded version of plsym.
5739              
5740             =for bad
5741              
5742             Bad values for z are simply skipped; all other bad values are not processed.
5743              
5744             In the following usage, all of the ndarrays must have the same dimensions:
5745              
5746             =for usage
5747              
5748             plcolorpoints($x, $y, $z, $symbol_index, $minz, $maxz)
5749              
5750             For example:
5751              
5752             =for example
5753              
5754             # Generate a parabola some points
5755             my $x = sequence(30) / 3; # Regular sampling
5756             my $y = $x**2; # Parabolic y
5757             my $z = 30 - $x**3; # Cubic coloration
5758             my $symbols = floor($x); # Use different symbols for each 1/3 of the plot
5759             # These should be integers.
5760              
5761             plcolorpoints($x, $y, $z, $symbols, -5, 20); # Thread over everything
5762             plcolorpoints($x, $y, 1, 1, -1, 2); # same color and symbol for all
5763              
5764             =pod
5765              
5766             Broadcasts over its inputs.
5767             Can't use POSIX threads.
5768              
5769             =for bad
5770              
5771             C processes bad values.
5772             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5773              
5774             =cut
5775              
5776              
5777              
5778              
5779             *plcolorpoints = \&PDL::plcolorpoints;
5780              
5781              
5782              
5783              
5784              
5785              
5786             =head2 plsmem
5787              
5788             =for sig
5789              
5790             Signature: (int maxx();int maxy();image(3,x,y))
5791             Types: (byte)
5792              
5793             =for usage
5794              
5795             plsmem($maxx, $maxy, $image); # all arguments given
5796             $maxx->plsmem($maxy, $image); # method call
5797              
5798             =for ref
5799              
5800             info not available
5801              
5802             =pod
5803              
5804             Broadcasts over its inputs.
5805             Can't use POSIX threads.
5806              
5807             =for bad
5808              
5809             C does not process bad values.
5810             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5811              
5812             =cut
5813              
5814              
5815              
5816              
5817             *plsmem = \&PDL::plsmem;
5818              
5819              
5820              
5821              
5822              
5823              
5824             =head2 plfbox
5825              
5826             =for sig
5827              
5828             Signature: (xo(); yo())
5829             Types: (double)
5830              
5831             =for usage
5832              
5833             plfbox($xo, $yo); # all arguments given
5834             $xo->plfbox($yo); # method call
5835              
5836             =for ref
5837              
5838             Box drawing primitive, taken from PLPLOT bar graph example
5839              
5840             =pod
5841              
5842             Broadcasts over its inputs.
5843             Can't use POSIX threads.
5844              
5845             =for bad
5846              
5847             C does not process bad values.
5848             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5849              
5850             =cut
5851              
5852              
5853              
5854              
5855             *plfbox = \&PDL::plfbox;
5856              
5857              
5858              
5859              
5860              
5861              
5862             =head2 plfbox1
5863              
5864             =for sig
5865              
5866             Signature: (xo(); yo(); bh(); w())
5867             Types: (double)
5868              
5869             =for usage
5870              
5871             plfbox1($xo, $yo, $bh, $w); # all arguments given
5872             $xo->plfbox1($yo, $bh, $w); # method call
5873              
5874             =for ref
5875              
5876             Box drawing primitive that allows specifying base height and width in addition to offset and height
5877              
5878             =pod
5879              
5880             Broadcasts over its inputs.
5881             Can't use POSIX threads.
5882              
5883             =for bad
5884              
5885             C does not process bad values.
5886             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5887              
5888             =cut
5889              
5890              
5891              
5892              
5893             *plfbox1 = \&PDL::plfbox1;
5894              
5895              
5896              
5897              
5898              
5899              
5900             =head2 plunfbox
5901              
5902             =for sig
5903              
5904             Signature: (xo(); yo())
5905             Types: (double)
5906              
5907             =for usage
5908              
5909             plunfbox($xo, $yo); # all arguments given
5910             $xo->plunfbox($yo); # method call
5911              
5912             =for ref
5913              
5914             Similar box drawing primitive, but without fill (just draw outline of box)
5915              
5916             =pod
5917              
5918             Broadcasts over its inputs.
5919             Can't use POSIX threads.
5920              
5921             =for bad
5922              
5923             C does not process bad values.
5924             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5925              
5926             =cut
5927              
5928              
5929              
5930              
5931             *plunfbox = \&PDL::plunfbox;
5932              
5933              
5934              
5935              
5936              
5937              
5938             =head2 plunfbox1
5939              
5940             =for sig
5941              
5942             Signature: (xo(); yo(); bh(); w())
5943             Types: (double)
5944              
5945             =for usage
5946              
5947             plunfbox1($xo, $yo, $bh, $w); # all arguments given
5948             $xo->plunfbox1($yo, $bh, $w); # method call
5949              
5950             =for ref
5951              
5952             Box drawing primitive that allows specifying base height and width in addition to offset and height
5953              
5954             =pod
5955              
5956             Broadcasts over its inputs.
5957             Can't use POSIX threads.
5958              
5959             =for bad
5960              
5961             C does not process bad values.
5962             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
5963              
5964             =cut
5965              
5966              
5967              
5968              
5969             *plunfbox1 = \&PDL::plunfbox1;
5970              
5971              
5972              
5973              
5974              
5975              
5976             =head2 plParseOpts
5977              
5978             =for sig
5979              
5980             Signature: (int [o] retval(); SV* argv; int mode)
5981             Types: (double)
5982              
5983             =for usage
5984              
5985             $retval = plParseOpts($argv, $mode);
5986             plParseOpts($retval, $argv, $mode); # all arguments given
5987             $retval = $argv->plParseOpts($mode); # method call
5988             $retval->plParseOpts($argv, $mode);
5989              
5990             =for ref
5991              
5992             Parse PLplot options given in @ARGV-like arrays
5993              
5994             =pod
5995              
5996             Broadcasts over its inputs.
5997             Can't use POSIX threads.
5998              
5999             =for bad
6000              
6001             C does not process bad values.
6002             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6003              
6004             =cut
6005              
6006              
6007              
6008              
6009             *plParseOpts = \&PDL::plParseOpts;
6010              
6011              
6012              
6013              
6014              
6015              
6016             =head2 plpoin
6017              
6018             =for sig
6019              
6020             Signature: (x(n); y(n); int code())
6021             Types: (double)
6022              
6023             =for usage
6024              
6025             plpoin($x, $y, $code); # all arguments given
6026             $x->plpoin($y, $code); # method call
6027              
6028             =for ref
6029              
6030             Plots a character at the specified points
6031              
6032             =pod
6033              
6034             Broadcasts over its inputs.
6035             Can't use POSIX threads.
6036              
6037             =for bad
6038              
6039             C does not process bad values.
6040             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6041              
6042             =cut
6043              
6044              
6045              
6046              
6047             *plpoin = \&PDL::plpoin;
6048              
6049              
6050              
6051              
6052              
6053              
6054             =head2 plpoin3
6055              
6056             =for sig
6057              
6058             Signature: (x(n); y(n); z(n); int code())
6059             Types: (double)
6060              
6061             =for usage
6062              
6063             plpoin3($x, $y, $z, $code); # all arguments given
6064             $x->plpoin3($y, $z, $code); # method call
6065              
6066             =for ref
6067              
6068             Plots a character at the specified points in 3 space
6069              
6070             =pod
6071              
6072             Broadcasts over its inputs.
6073             Can't use POSIX threads.
6074              
6075             =for bad
6076              
6077             C does not process bad values.
6078             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6079              
6080             =cut
6081              
6082              
6083              
6084              
6085             *plpoin3 = \&PDL::plpoin3;
6086              
6087              
6088              
6089              
6090              
6091              
6092             =head2 plline3
6093              
6094             =for sig
6095              
6096             Signature: (x(n); y(n); z(n))
6097             Types: (double)
6098              
6099             =for usage
6100              
6101             plline3($x, $y, $z); # all arguments given
6102             $x->plline3($y, $z); # method call
6103              
6104             =for ref
6105              
6106             Draw a line in 3 space
6107              
6108             =pod
6109              
6110             Broadcasts over its inputs.
6111             Can't use POSIX threads.
6112              
6113             =for bad
6114              
6115             C does not process bad values.
6116             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6117              
6118             =cut
6119              
6120              
6121              
6122              
6123             *plline3 = \&PDL::plline3;
6124              
6125              
6126              
6127              
6128              
6129              
6130             =head2 plpoly3
6131              
6132             =for sig
6133              
6134             Signature: (x(n); y(n); z(n); int draw(m); int ifcc())
6135             Types: (double)
6136              
6137             =for usage
6138              
6139             plpoly3($x, $y, $z, $draw, $ifcc); # all arguments given
6140             $x->plpoly3($y, $z, $draw, $ifcc); # method call
6141              
6142             =for ref
6143              
6144             Draws a polygon in 3 space
6145              
6146             =pod
6147              
6148             Broadcasts over its inputs.
6149             Can't use POSIX threads.
6150              
6151             =for bad
6152              
6153             C does not process bad values.
6154             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6155              
6156             =cut
6157              
6158              
6159              
6160              
6161             *plpoly3 = \&PDL::plpoly3;
6162              
6163              
6164              
6165              
6166              
6167              
6168             =head2 plhist
6169              
6170             =for sig
6171              
6172             Signature: (data(n); datmin(); datmax(); int nbin(); int oldwin())
6173             Types: (double)
6174              
6175             =for usage
6176              
6177             plhist($data, $datmin, $datmax, $nbin, $oldwin); # all arguments given
6178             $data->plhist($datmin, $datmax, $nbin, $oldwin); # method call
6179              
6180             =for ref
6181              
6182             Plot a histogram from unbinned data
6183              
6184             =pod
6185              
6186             Broadcasts over its inputs.
6187             Can't use POSIX threads.
6188              
6189             =for bad
6190              
6191             C does not process bad values.
6192             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6193              
6194             =cut
6195              
6196              
6197              
6198              
6199             *plhist = \&PDL::plhist;
6200              
6201              
6202              
6203              
6204              
6205              
6206             =head2 plfill
6207              
6208             =for sig
6209              
6210             Signature: (x(n); y(n))
6211             Types: (double)
6212              
6213             =for usage
6214              
6215             plfill($x, $y); # all arguments given
6216             $x->plfill($y); # method call
6217              
6218             =for ref
6219              
6220             Area fill
6221              
6222             =pod
6223              
6224             Broadcasts over its inputs.
6225             Can't use POSIX threads.
6226              
6227             =for bad
6228              
6229             C does not process bad values.
6230             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6231              
6232             =cut
6233              
6234              
6235              
6236              
6237             *plfill = \&PDL::plfill;
6238              
6239              
6240              
6241              
6242              
6243              
6244             =head2 plgradient
6245              
6246             =for sig
6247              
6248             Signature: (x(n); y(n); angle())
6249             Types: (double)
6250              
6251             =for usage
6252              
6253             plgradient($x, $y, $angle); # all arguments given
6254             $x->plgradient($y, $angle); # method call
6255              
6256             =for ref
6257              
6258             Area fill with color gradient
6259              
6260             =pod
6261              
6262             Broadcasts over its inputs.
6263             Can't use POSIX threads.
6264              
6265             =for bad
6266              
6267             C does not process bad values.
6268             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6269              
6270             =cut
6271              
6272              
6273              
6274              
6275             *plgradient = \&PDL::plgradient;
6276              
6277              
6278              
6279              
6280              
6281              
6282             =head2 plsym
6283              
6284             =for sig
6285              
6286             Signature: (x(n); y(n); int code())
6287             Types: (double)
6288              
6289             =for usage
6290              
6291             plsym($x, $y, $code); # all arguments given
6292             $x->plsym($y, $code); # method call
6293              
6294             =for ref
6295              
6296             Plots a symbol at the specified points
6297              
6298             =pod
6299              
6300             Broadcasts over its inputs.
6301             Can't use POSIX threads.
6302              
6303             =for bad
6304              
6305             C does not process bad values.
6306             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6307              
6308             =cut
6309              
6310              
6311              
6312              
6313             *plsym = \&PDL::plsym;
6314              
6315              
6316              
6317              
6318              
6319              
6320             =head2 plsurf3d
6321              
6322             =for sig
6323              
6324             Signature: (x(nx); y(ny); z(nx,ny); int opt(); clevel(nlevel))
6325             Types: (double)
6326              
6327             =for usage
6328              
6329             plsurf3d($x, $y, $z, $opt, $clevel); # all arguments given
6330             $x->plsurf3d($y, $z, $opt, $clevel); # method call
6331              
6332             =for ref
6333              
6334             Plot shaded 3-d surface plot
6335              
6336             =pod
6337              
6338             Broadcasts over its inputs.
6339             Can't use POSIX threads.
6340              
6341             =for bad
6342              
6343             C does not process bad values.
6344             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6345              
6346             =cut
6347              
6348              
6349              
6350              
6351             *plsurf3d = \&PDL::plsurf3d;
6352              
6353              
6354              
6355              
6356              
6357              
6358             =head2 plsurf3dl
6359              
6360             =for sig
6361              
6362             Signature: (x(nx); y(ny); z(nx,ny); int opt(); clevel(nlevel); int indexxmin(); int indexxmax(); int indexymin(nx); int indexymax(nx))
6363             Types: (double)
6364              
6365             =for usage
6366              
6367             plsurf3dl($x, $y, $z, $opt, $clevel, $indexxmin, $indexxmax, $indexymin, $indexymax); # all arguments given
6368             $x->plsurf3dl($y, $z, $opt, $clevel, $indexxmin, $indexxmax, $indexymin, $indexymax); # method call
6369              
6370             =for ref
6371              
6372             Plot shaded 3-d surface plot with limits
6373              
6374             =pod
6375              
6376             Broadcasts over its inputs.
6377             Can't use POSIX threads.
6378              
6379             =for bad
6380              
6381             C does not process bad values.
6382             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6383              
6384             =cut
6385              
6386              
6387              
6388              
6389             *plsurf3dl = \&PDL::plsurf3dl;
6390              
6391              
6392              
6393              
6394              
6395              
6396             =head2 plstyl
6397              
6398             =for sig
6399              
6400             Signature: (int mark(nms); int space(nms))
6401             Types: (double)
6402              
6403             =for usage
6404              
6405             plstyl($mark, $space); # all arguments given
6406             $mark->plstyl($space); # method call
6407              
6408             =for ref
6409              
6410             Set line style
6411              
6412             =pod
6413              
6414             Broadcasts over its inputs.
6415             Can't use POSIX threads.
6416              
6417             =for bad
6418              
6419             C does not process bad values.
6420             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6421              
6422             =cut
6423              
6424              
6425              
6426              
6427             *plstyl = \&PDL::plstyl;
6428              
6429              
6430              
6431              
6432              
6433              
6434             =head2 plseed
6435              
6436             =for sig
6437              
6438             Signature: (int seed())
6439             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
6440             float double ldouble)
6441              
6442             =for usage
6443              
6444             plseed($seed); # all arguments given
6445             $seed->plseed; # method call
6446              
6447             =for ref
6448              
6449             info not available
6450              
6451             =pod
6452              
6453             Broadcasts over its inputs.
6454             Can't use POSIX threads.
6455              
6456             =for bad
6457              
6458             C does not process bad values.
6459             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6460              
6461             =cut
6462              
6463              
6464              
6465              
6466             *plseed = \&PDL::plseed;
6467              
6468              
6469              
6470              
6471              
6472              
6473             =head2 plrandd
6474              
6475             =for sig
6476              
6477             Signature: (double [o]rand())
6478             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
6479             float double ldouble)
6480              
6481             =for usage
6482              
6483             $rand = plrandd();
6484             plrandd($rand); # all arguments given
6485             $rand->plrandd;
6486              
6487             =for ref
6488              
6489             info not available
6490              
6491             =pod
6492              
6493             Broadcasts over its inputs.
6494             Can't use POSIX threads.
6495              
6496             =for bad
6497              
6498             C does not process bad values.
6499             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6500              
6501             =cut
6502              
6503              
6504              
6505              
6506             *plrandd = \&PDL::plrandd;
6507              
6508              
6509              
6510              
6511              
6512              
6513             =head2 plAllocGrid
6514              
6515             =for sig
6516              
6517             Signature: (double xg(nx); double yg(ny); [o] PLcGridPtr__OUT grid)
6518             Types: (double)
6519              
6520             =for usage
6521              
6522             $grid = plAllocGrid($xg, $yg);
6523             plAllocGrid($xg, $yg, $grid); # all arguments given
6524             $grid = $xg->plAllocGrid($yg); # method call
6525             $xg->plAllocGrid($yg, $grid);
6526              
6527             =for ref
6528              
6529             Allocates a PLcGrid object for use in pltr1
6530              
6531             =pod
6532              
6533             Broadcasts over its inputs.
6534             Can't use POSIX threads.
6535              
6536             =for bad
6537              
6538             C does not process bad values.
6539             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6540              
6541             =cut
6542              
6543              
6544              
6545              
6546             *plAllocGrid = \&PDL::plAllocGrid;
6547              
6548              
6549              
6550              
6551              
6552              
6553             =head2 plAlloc2dGrid
6554              
6555             =for sig
6556              
6557             Signature: (double xg(nx,ny); double yg(nx,ny); [o] PLcGrid2Ptr__OUT grid)
6558             Types: (double)
6559              
6560             =for usage
6561              
6562             $grid = plAlloc2dGrid($xg, $yg);
6563             plAlloc2dGrid($xg, $yg, $grid); # all arguments given
6564             $grid = $xg->plAlloc2dGrid($yg); # method call
6565             $xg->plAlloc2dGrid($yg, $grid);
6566              
6567             =for ref
6568              
6569             Allocates a PLcGrid2 object for use in pltr2
6570              
6571             =pod
6572              
6573             Broadcasts over its inputs.
6574             Can't use POSIX threads.
6575              
6576             =for bad
6577              
6578             C does not process bad values.
6579             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6580              
6581             =cut
6582              
6583              
6584              
6585              
6586             *plAlloc2dGrid = \&PDL::plAlloc2dGrid;
6587              
6588              
6589              
6590              
6591              
6592              
6593             =head2 init_pltr
6594              
6595             =for sig
6596              
6597             Signature: (; SV* p0; SV* p1; SV* p2)
6598             Types: (double)
6599              
6600             =for usage
6601              
6602             init_pltr($p0, $p1, $p2); # all arguments given
6603             $p0->init_pltr($p1, $p2); # method call
6604              
6605             Used internally to set the variables C to the "pointers"
6606             of the Perl subroutines C. These variables are later used by
6607             C to provide the pointers to the C function C.
6608             This accelerates functions like plcont and plshades when those standard
6609             transformation functions are used.
6610              
6611             =pod
6612              
6613             Broadcasts over its inputs.
6614             Can't use POSIX threads.
6615              
6616             =for bad
6617              
6618             C does not process bad values.
6619             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6620              
6621             =cut
6622              
6623              
6624              
6625              
6626             *init_pltr = \&PDL::init_pltr;
6627              
6628              
6629              
6630              
6631              
6632             #line 3987 "plplot.pd"
6633              
6634             init_pltr (\&pltr0, \&pltr1, \&pltr2);
6635             #line 6636 "PLplot.pm"
6636              
6637              
6638             =head2 plmap
6639              
6640             =for sig
6641              
6642             Signature: (minlong(); maxlong(); minlat(); maxlat(); SV* mapform; char* type)
6643             Types: (double)
6644              
6645             =for usage
6646              
6647             plmap($minlong, $maxlong, $minlat, $maxlat, $mapform, $type); # all arguments given
6648             $minlong->plmap($maxlong, $minlat, $maxlat, $mapform, $type); # method call
6649              
6650             =for ref
6651              
6652             plot continental outline in world coordinates
6653              
6654             =pod
6655              
6656             Broadcasts over its inputs.
6657             Can't use POSIX threads.
6658              
6659             =for bad
6660              
6661             C does not process bad values.
6662             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6663              
6664             =cut
6665              
6666              
6667              
6668              
6669 4     4 0 490630 sub PDL::plmap { _reorder('plmap', 'PDL::_plmap_int', $standard_order, @_) }
6670              
6671              
6672              
6673             *plmap = \&PDL::plmap;
6674              
6675              
6676              
6677              
6678              
6679              
6680             =head2 plstring
6681              
6682             =for sig
6683              
6684             Signature: (x(na); y(na); char* string)
6685             Types: (double)
6686              
6687             =for usage
6688              
6689             plstring($x, $y, $string); # all arguments given
6690             $x->plstring($y, $string); # method call
6691              
6692             =for ref
6693              
6694             plot a string along a line
6695              
6696             =pod
6697              
6698             Broadcasts over its inputs.
6699             Can't use POSIX threads.
6700              
6701             =for bad
6702              
6703             C does not process bad values.
6704             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6705              
6706             =cut
6707              
6708              
6709              
6710              
6711             *plstring = \&PDL::plstring;
6712              
6713              
6714              
6715              
6716              
6717              
6718             =head2 plstring3
6719              
6720             =for sig
6721              
6722             Signature: (x(na); y(na); z(na); char* string)
6723             Types: (double)
6724              
6725             =for usage
6726              
6727             plstring3($x, $y, $z, $string); # all arguments given
6728             $x->plstring3($y, $z, $string); # method call
6729              
6730             =for ref
6731              
6732             plot a string along a 3D line
6733              
6734             =pod
6735              
6736             Broadcasts over its inputs.
6737             Can't use POSIX threads.
6738              
6739             =for bad
6740              
6741             C does not process bad values.
6742             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6743              
6744             =cut
6745              
6746              
6747              
6748              
6749             *plstring3 = \&PDL::plstring3;
6750              
6751              
6752              
6753              
6754              
6755              
6756             =head2 plmeridians
6757              
6758             =for sig
6759              
6760             Signature: (dlong(); dlat(); minlong(); maxlong(); minlat(); maxlat(); SV* mapform)
6761             Types: (double)
6762              
6763             =for usage
6764              
6765             plmeridians($dlong, $dlat, $minlong, $maxlong, $minlat, $maxlat, $mapform); # all arguments given
6766             $dlong->plmeridians($dlat, $minlong, $maxlong, $minlat, $maxlat, $mapform); # method call
6767              
6768             =for ref
6769              
6770             Plot the latitudes and longitudes on the background
6771              
6772             =pod
6773              
6774             Broadcasts over its inputs.
6775             Can't use POSIX threads.
6776              
6777             =for bad
6778              
6779             C does not process bad values.
6780             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6781              
6782             =cut
6783              
6784              
6785              
6786              
6787 2     2 0 49 sub PDL::plmeridians { _reorder('plmeridians', 'PDL::_plmeridians_int', $standard_order, @_) }
6788              
6789              
6790              
6791             *plmeridians = \&PDL::plmeridians;
6792              
6793              
6794              
6795              
6796              
6797              
6798             =head2 plshades
6799              
6800             =for sig
6801              
6802             Signature: (z(x,y); xmin(); xmax(); ymin(); ymax();
6803             clevel(l); int fill_width(); int cont_color();
6804             int cont_width(); int rectangular(); SV* defined; SV* pltr; SV* pltr_data)
6805             Types: (double)
6806              
6807             =for usage
6808              
6809             plshades($z, $xmin, $xmax, $ymin, $ymax, $clevel, $fill_width, $cont_color, $cont_width, $rectangular, $defined, $pltr, $pltr_data); # all arguments given
6810             $z->plshades($xmin, $xmax, $ymin, $ymax, $clevel, $fill_width, $cont_color, $cont_width, $rectangular, $defined, $pltr, $pltr_data); # method call
6811              
6812             =for ref
6813              
6814             Shade regions on the basis of value
6815              
6816             =pod
6817              
6818             Broadcasts over its inputs.
6819             Can't use POSIX threads.
6820              
6821             =for bad
6822              
6823             C does not process bad values.
6824             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6825              
6826             =cut
6827              
6828              
6829              
6830              
6831 9     9 0 830089 sub PDL::plshades { _reorder('plshades', 'PDL::_plshades_int', $standard_order, @_) }
6832              
6833              
6834              
6835             *plshades = \&PDL::plshades;
6836              
6837              
6838              
6839              
6840              
6841              
6842             =head2 plcont
6843              
6844             =for sig
6845              
6846             Signature: (f(nx,ny); int kx(); int lx(); int ky(); int ly(); clevel(nlevel); SV* pltr; SV* pltr_data)
6847             Types: (double)
6848              
6849             =for usage
6850              
6851             plcont($f, $kx, $lx, $ky, $ly, $clevel, $pltr, $pltr_data); # all arguments given
6852             $f->plcont($kx, $lx, $ky, $ly, $clevel, $pltr, $pltr_data); # method call
6853              
6854             =for ref
6855              
6856             Plot contours
6857              
6858             =pod
6859              
6860             Broadcasts over its inputs.
6861             Can't use POSIX threads.
6862              
6863             =for bad
6864              
6865             C does not process bad values.
6866             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6867              
6868             =cut
6869              
6870              
6871              
6872              
6873             *plcont = \&PDL::plcont;
6874              
6875              
6876              
6877              
6878              
6879              
6880             =head2 plmesh
6881              
6882             =for sig
6883              
6884             Signature: (x(nx); y(ny); z(nx,ny); int opt())
6885             Types: (double)
6886              
6887             =for usage
6888              
6889             plmesh($x, $y, $z, $opt); # all arguments given
6890             $x->plmesh($y, $z, $opt); # method call
6891              
6892             =for ref
6893              
6894             Surface mesh
6895              
6896             =pod
6897              
6898             Broadcasts over its inputs.
6899             Can't use POSIX threads.
6900              
6901             =for bad
6902              
6903             C does not process bad values.
6904             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6905              
6906             =cut
6907              
6908              
6909              
6910              
6911             *plmesh = \&PDL::plmesh;
6912              
6913              
6914              
6915              
6916              
6917              
6918             =head2 plmeshc
6919              
6920             =for sig
6921              
6922             Signature: (x(nx); y(ny); z(nx,ny); int opt(); clevel(nlevel))
6923             Types: (double)
6924              
6925             =for usage
6926              
6927             plmeshc($x, $y, $z, $opt, $clevel); # all arguments given
6928             $x->plmeshc($y, $z, $opt, $clevel); # method call
6929              
6930             =for ref
6931              
6932             Magnitude colored plot surface mesh with contour
6933              
6934             =pod
6935              
6936             Broadcasts over its inputs.
6937             Can't use POSIX threads.
6938              
6939             =for bad
6940              
6941             C does not process bad values.
6942             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6943              
6944             =cut
6945              
6946              
6947              
6948              
6949             *plmeshc = \&PDL::plmeshc;
6950              
6951              
6952              
6953              
6954              
6955              
6956             =head2 plot3d
6957              
6958             =for sig
6959              
6960             Signature: (x(nx); y(ny); z(nx,ny); int opt(); int side())
6961             Types: (double)
6962              
6963             =for usage
6964              
6965             plot3d($x, $y, $z, $opt, $side); # all arguments given
6966             $x->plot3d($y, $z, $opt, $side); # method call
6967              
6968             =for ref
6969              
6970             3-d surface plot
6971              
6972             =pod
6973              
6974             Broadcasts over its inputs.
6975             Can't use POSIX threads.
6976              
6977             =for bad
6978              
6979             C does not process bad values.
6980             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
6981              
6982             =cut
6983              
6984              
6985              
6986              
6987             *plot3d = \&PDL::plot3d;
6988              
6989              
6990              
6991              
6992              
6993              
6994             =head2 plot3dc
6995              
6996             =for sig
6997              
6998             Signature: (x(nx); y(ny); z(nx,ny); int opt(); clevel(nlevel))
6999             Types: (double)
7000              
7001             =for usage
7002              
7003             plot3dc($x, $y, $z, $opt, $clevel); # all arguments given
7004             $x->plot3dc($y, $z, $opt, $clevel); # method call
7005              
7006             =for ref
7007              
7008             Plots a 3-d representation of the function z[x][y] with contour
7009              
7010             =pod
7011              
7012             Broadcasts over its inputs.
7013             Can't use POSIX threads.
7014              
7015             =for bad
7016              
7017             C does not process bad values.
7018             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7019              
7020             =cut
7021              
7022              
7023              
7024              
7025             *plot3dc = \&PDL::plot3dc;
7026              
7027              
7028              
7029              
7030              
7031              
7032             =head2 plscmap1l
7033              
7034             =for sig
7035              
7036             Signature: (int itype(); isty(n); coord1(n); coord2(n); coord3(n); int rev(nrev))
7037             Types: (double)
7038              
7039             =for usage
7040              
7041             plscmap1l($itype, $isty, $coord1, $coord2, $coord3, $rev); # all arguments given
7042             $itype->plscmap1l($isty, $coord1, $coord2, $coord3, $rev); # method call
7043              
7044             =for ref
7045              
7046             Set color map1 colors using a piece-wise linear relationship
7047              
7048             =pod
7049              
7050             Broadcasts over its inputs.
7051             Can't use POSIX threads.
7052              
7053             =for bad
7054              
7055             C does not process bad values.
7056             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7057              
7058             =cut
7059              
7060              
7061              
7062              
7063             *plscmap1l = \&PDL::plscmap1l;
7064              
7065              
7066              
7067              
7068              
7069              
7070             =head2 plshade1
7071              
7072             =for sig
7073              
7074             Signature: (a(nx,ny); left(); right(); bottom(); top(); shade_min();shade_max(); sh_cmap(); sh_color(); sh_width();min_color(); min_width(); max_color(); max_width();rectangular(); SV* defined; SV* pltr; SV* pltr_data)
7075             Types: (double)
7076              
7077             =for usage
7078              
7079             plshade1($a, $left, $right, $bottom, $top, $shade_min, $shade_max, $sh_cmap, $sh_color, $sh_width, $min_color, $min_width, $max_color, $max_width, $rectangular, $defined, $pltr, $pltr_data); # all arguments given
7080             $a->plshade1($left, $right, $bottom, $top, $shade_min, $shade_max, $sh_cmap, $sh_color, $sh_width, $min_color, $min_width, $max_color, $max_width, $rectangular, $defined, $pltr, $pltr_data); # method call
7081              
7082             =for ref
7083              
7084             Shade individual region on the basis of value
7085              
7086             =pod
7087              
7088             Broadcasts over its inputs.
7089             Can't use POSIX threads.
7090              
7091             =for bad
7092              
7093             C does not process bad values.
7094             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7095              
7096             =cut
7097              
7098              
7099              
7100              
7101 11     11 0 341914 sub PDL::plshade1 { _reorder('plshade1', 'PDL::_plshade1_int', $standard_order, @_) }
7102              
7103              
7104              
7105             *plshade1 = \&PDL::plshade1;
7106              
7107              
7108              
7109              
7110              
7111              
7112             =head2 plimage
7113              
7114             =for sig
7115              
7116             Signature: (idata(nx,ny); xmin(); xmax(); ymin(); ymax();zmin(); zmax(); Dxmin(); Dxmax(); Dymin(); Dymax())
7117             Types: (double)
7118              
7119             =for usage
7120              
7121             plimage($idata, $xmin, $xmax, $ymin, $ymax, $zmin, $zmax, $Dxmin, $Dxmax, $Dymin, $Dymax); # all arguments given
7122             $idata->plimage($xmin, $xmax, $ymin, $ymax, $zmin, $zmax, $Dxmin, $Dxmax, $Dymin, $Dymax); # method call
7123              
7124             =for ref
7125              
7126             Plot gray-level image
7127              
7128             =pod
7129              
7130             Broadcasts over its inputs.
7131             Can't use POSIX threads.
7132              
7133             =for bad
7134              
7135             C does not process bad values.
7136             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7137              
7138             =cut
7139              
7140              
7141              
7142              
7143             *plimage = \&PDL::plimage;
7144              
7145              
7146              
7147              
7148              
7149              
7150             =head2 plimagefr
7151              
7152             =for sig
7153              
7154             Signature: (idata(nx,ny); xmin(); xmax(); ymin(); ymax();zmin(); zmax(); valuemin(); valuemax(); SV* pltr; SV* pltr_data)
7155             Types: (double)
7156              
7157             =for usage
7158              
7159             plimagefr($idata, $xmin, $xmax, $ymin, $ymax, $zmin, $zmax, $valuemin, $valuemax, $pltr, $pltr_data); # all arguments given
7160             $idata->plimagefr($xmin, $xmax, $ymin, $ymax, $zmin, $zmax, $valuemin, $valuemax, $pltr, $pltr_data); # method call
7161              
7162             =for ref
7163              
7164             Plot image with transformation
7165              
7166             =pod
7167              
7168             Broadcasts over its inputs.
7169             Can't use POSIX threads.
7170              
7171             =for bad
7172              
7173             C does not process bad values.
7174             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7175              
7176             =cut
7177              
7178              
7179              
7180              
7181             *plimagefr = \&PDL::plimagefr;
7182              
7183              
7184              
7185              
7186              
7187             #line 4354 "plplot.pd"
7188              
7189             =head2 plxormod
7190              
7191             =for sig
7192              
7193             $status = plxormod ($mode)
7194              
7195             =for ref
7196              
7197             Set xor mode:
7198             mode = 1-enter, 0-leave, status = 0 if not interactive device
7199              
7200             See the PLplot manual for reference.
7201              
7202             =cut
7203              
7204             #line 4385 "plplot.pd"
7205              
7206             =head2 plGetCursor
7207              
7208             =for sig
7209              
7210             %gin = plGetCursor ()
7211              
7212             =for ref
7213              
7214             plGetCursor waits for graphics input event and translate to world
7215             coordinates and returns a hash with the following keys:
7216              
7217             type: of event (CURRENTLY UNUSED)
7218             state: key or button mask
7219             keysym: key selected
7220             button: mouse button selected
7221             subwindow: subwindow (alias subpage, alias subplot) number
7222             string: translated string
7223             pX, pY: absolute device coordinates of pointer
7224             dX, dY: relative device coordinates of pointer
7225             wX, wY: world coordinates of pointer
7226              
7227             Returns an empty hash if no translation to world coordinates is possible.
7228              
7229             =cut
7230              
7231             #line 4448 "plplot.pd"
7232              
7233             =head2 plgstrm
7234              
7235             =for sig
7236              
7237             $strm = plgstrm ()
7238              
7239             =for ref
7240              
7241             Returns the number of the current output stream.
7242              
7243             =cut
7244              
7245             #line 4475 "plplot.pd"
7246              
7247             =head2 plgsdev
7248              
7249             =for sig
7250              
7251             $driver = plgdev ()
7252              
7253             =for ref
7254              
7255             Returns the current driver name.
7256              
7257             =cut
7258              
7259             #line 4515 "plplot.pd"
7260              
7261             =head2 plmkstrm
7262              
7263             =for sig
7264              
7265             $strm = plmkstrm ()
7266              
7267             =for ref
7268              
7269             Creates a new stream and makes it the default. Returns the number of
7270             the created stream.
7271              
7272             =cut
7273              
7274             #line 4543 "plplot.pd"
7275              
7276             =head2 plgver
7277              
7278             =for sig
7279              
7280             $version = plgver ()
7281              
7282             =for ref
7283              
7284             Get the current library version number
7285              
7286             See the PLplot manual for reference.
7287              
7288             =cut
7289             #line 7290 "PLplot.pm"
7290              
7291              
7292             =head2 plstripc
7293              
7294             =for sig
7295              
7296             Signature: (xmin(); xmax(); xjump(); ymin(); ymax();xlpos(); ylpos(); int y_ascl(); int acc();int colbox(); int collab();int colline(n); int styline(n);int [o] id(); char* xspec; char* yspec; SV* legline;char* labx; char* laby; char* labtop)
7297             Types: (double)
7298              
7299             =for usage
7300              
7301             $id = plstripc($xmin, $xmax, $xjump, $ymin, $ymax, $xlpos, $ylpos, $y_ascl, $acc, $colbox, $collab, $colline, $styline, $xspec, $yspec, $legline, $labx, $laby, $labtop);
7302             plstripc($xmin, $xmax, $xjump, $ymin, $ymax, $xlpos, $ylpos, $y_ascl, $acc, $colbox, $collab, $colline, $styline, $id, $xspec, $yspec, $legline, $labx, $laby, $labtop); # all arguments given
7303             $id = $xmin->plstripc($xmax, $xjump, $ymin, $ymax, $xlpos, $ylpos, $y_ascl, $acc, $colbox, $collab, $colline, $styline, $xspec, $yspec, $legline, $labx, $laby, $labtop); # method call
7304             $xmin->plstripc($xmax, $xjump, $ymin, $ymax, $xlpos, $ylpos, $y_ascl, $acc, $colbox, $collab, $colline, $styline, $id, $xspec, $yspec, $legline, $labx, $laby, $labtop);
7305              
7306             =for ref
7307              
7308             FIXME: documentation here!
7309              
7310             =pod
7311              
7312             Broadcasts over its inputs.
7313             Can't use POSIX threads.
7314              
7315             =for bad
7316              
7317             C does not process bad values.
7318             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7319              
7320             =cut
7321              
7322              
7323              
7324              
7325 1     1 0 255697 sub PDL::plstripc { _reorder('plstripc', 'PDL::_plstripc_int', $standard_order, @_) }
7326              
7327              
7328              
7329             *plstripc = \&PDL::plstripc;
7330              
7331              
7332              
7333              
7334              
7335              
7336             =head2 plgriddata
7337              
7338             =for sig
7339              
7340             Signature: (x(npts); y(npts); z(npts); xg(nptsx); yg(nptsy);int type(); data(); [o] zg(nptsx,nptsy))
7341             Types: (double)
7342              
7343             =for usage
7344              
7345             $zg = plgriddata($x, $y, $z, $xg, $yg, $type, $data);
7346             plgriddata($x, $y, $z, $xg, $yg, $type, $data, $zg); # all arguments given
7347             $zg = $x->plgriddata($y, $z, $xg, $yg, $type, $data); # method call
7348             $x->plgriddata($y, $z, $xg, $yg, $type, $data, $zg);
7349              
7350             =for ref
7351              
7352             FIXME: documentation here!
7353              
7354             =pod
7355              
7356             Broadcasts over its inputs.
7357             Can't use POSIX threads.
7358              
7359             =for bad
7360              
7361             C does not process bad values.
7362             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7363              
7364             =cut
7365              
7366              
7367              
7368              
7369             *plgriddata = \&PDL::plgriddata;
7370              
7371              
7372              
7373              
7374              
7375             #line 4650 "plplot.pd"
7376              
7377             =head2 plarc
7378              
7379             =for sig
7380              
7381             plarc ($x, $y, $a, $b, $angle1, $angle2, $rotate, $fill);
7382              
7383             =for ref
7384              
7385             Draw a (possibly) filled arc centered at x, y with semimajor axis a and semiminor axis b, starting at angle1 and ending at angle2.
7386             See the PLplot manual for reference.
7387              
7388             =cut
7389              
7390             #line 4682 "plplot.pd"
7391              
7392             =head2 plstransform
7393              
7394             =for sig
7395              
7396             plstransform ($subroutine_reference, $data);
7397              
7398             =for ref
7399              
7400             Sets the default transformation routine for plotting.
7401              
7402             sub mapform {
7403             my ($x, $y, $data) = @_;
7404              
7405             my $radius = 90.0 - $y;
7406             my $xp = $radius * cos ($x * pi / 180);
7407             my $yp = $radius * sin ($x * pi / 180);
7408              
7409             return ($xp, $yp);
7410             }
7411             plstransform (\&mapform, undef);
7412              
7413             See the PLplot manual for more details.
7414              
7415             =cut
7416              
7417             #line 4723 "plplot.pd"
7418              
7419             =head2 plslabelfunc
7420              
7421             =for sig
7422              
7423             plslabelfunc ($subroutine_reference);
7424              
7425             =for ref
7426              
7427             # A custom axis labeling function for longitudes and latitudes.
7428             sub geolocation_labeler {
7429             my ($axis, $value, $length) = @_;
7430             my ($direction_label, $label_val);
7431             if (($axis == PL_Y_AXIS) && $value == 0) {
7432             return "Eq";
7433             } elsif ($axis == PL_Y_AXIS) {
7434             $label_val = $value;
7435             $direction_label = ($label_val > 0) ? " N" : " S";
7436             } elsif ($axis == PL_X_AXIS) {
7437             my $times = floor((abs($value) + 180.0 ) / 360.0);
7438             $label_val = ($value < 0) ? $value + 360.0 * $times : $value - 360.0 * $times;
7439             $direction_label = ($label_val > 0) ? " E"
7440             : ($label_val < 0) ? " W"
7441             : "";
7442             }
7443             return substr (sprintf ("%.0f%s", abs($label_val), $direction_label), 0, $length);
7444             }
7445             plslabelfunc(\&geolocation_labeler);
7446              
7447             The PDL version of plslabelfunc only has one argument--the perl subroutine
7448             to do the label translation:
7449              
7450             my $labeltext = perl_labelfunc($axis, $value, $length);
7451              
7452             No 'data' argument is used, it is assumed that global data or a closure containing
7453             necessary data can be used in 'perl_labelfunc'.
7454              
7455             See the PLplot manual for more details.
7456              
7457             =cut
7458              
7459             #line 4778 "plplot.pd"
7460              
7461             =head2 pllegend
7462              
7463             =for sig
7464              
7465             my ($legend_width, $legend_height) =
7466             pllegend ($position, $opt, $x, $y, $plot_width, $bg_color, $nlegend,
7467             \@opt_array,
7468             $text_offset, $text_scale, $text_spacing, $test_justification,
7469             \@text_colors, \@text, \@box_colors, \@box_patterns, \@box_scales, \@line_colors,
7470             \@line_styles, \@line_widths, \@symbol_colors, \@symbol_scales, \@symbol_numbers, \@symbols);
7471              
7472             =for ref
7473              
7474             See the PLplot manual for more details.
7475              
7476             =cut
7477              
7478             #line 4956 "plplot.pd"
7479              
7480             =head2 plspal0
7481              
7482             =for sig
7483              
7484             plspal0($filename);
7485              
7486             =for ref
7487              
7488             Set color palette 0 from the input .pal file. See the PLplot manual for more details.
7489              
7490             =cut
7491              
7492             #line 4981 "plplot.pd"
7493              
7494             =head2 plspal1
7495              
7496             =for sig
7497              
7498             plspal1($filename);
7499              
7500             =for ref
7501              
7502             Set color palette 1 from the input .pal file. See the PLplot manual for more details.
7503              
7504             =cut
7505              
7506             #line 5005 "plplot.pd"
7507              
7508             =head2 plbtime
7509              
7510             =for sig
7511              
7512             my ($year, $month, $day, $hour, $min, $sec) = plbtime($ctime);
7513              
7514             =for ref
7515              
7516             Calculate broken-down time from continuous time for current stream.
7517              
7518             =cut
7519              
7520             #line 5041 "plplot.pd"
7521              
7522             =head2 plconfigtime
7523              
7524             =for sig
7525              
7526             plconfigtime($scale, $offset1, $offset2, $ccontrol, $ifbtime_offset, $year, $month, $day, $hour, $min, $sec);
7527              
7528             =for ref
7529              
7530             Configure transformation between continuous and broken-down time (and
7531             vice versa) for current stream.
7532              
7533             =cut
7534              
7535             #line 5077 "plplot.pd"
7536              
7537             =head2 plctime
7538              
7539             =for sig
7540              
7541             my $ctime = plctime($year, $month, $day, $hour, $min, $sec);
7542              
7543             =for ref
7544              
7545             Calculate continuous time from broken-down time for current stream.
7546              
7547             =cut
7548              
7549             #line 5108 "plplot.pd"
7550              
7551             =head2 pltimefmt
7552              
7553             =for sig
7554              
7555             pltimefmt($fmt);
7556              
7557             =for ref
7558              
7559             Set format for date / time labels. Labels must be configured to treat values as
7560             seconds since the epoch via the XBOX/YBOX flags. C<$fmt> is generally
7561             consistent with the POSIX strpformat/strftime flags, but see the PLplot manual
7562             for details.
7563              
7564             =cut
7565              
7566             #line 5134 "plplot.pd"
7567              
7568             =head2 plsesc
7569              
7570             =for sig
7571              
7572             plsesc($esc);
7573              
7574             =for ref
7575              
7576             Set the escape character for text strings. See the PLplot manual for more details.
7577              
7578             =cut
7579             #line 7580 "PLplot.pm"
7580              
7581              
7582             =head2 plvect
7583              
7584             =for sig
7585              
7586             Signature: (u(nx,ny); v(nx,ny); scale(); SV* pltr; SV* pltr_data)
7587             Types: (double)
7588              
7589             =for usage
7590              
7591             plvect($u, $v, $scale, $pltr, $pltr_data); # all arguments given
7592             $u->plvect($v, $scale, $pltr, $pltr_data); # method call
7593              
7594             =for ref
7595              
7596             Vector field plots
7597              
7598             =pod
7599              
7600             Broadcasts over its inputs.
7601             Can't use POSIX threads.
7602              
7603             =for bad
7604              
7605             C does not process bad values.
7606             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7607              
7608             =cut
7609              
7610              
7611              
7612              
7613             *plvect = \&PDL::plvect;
7614              
7615              
7616              
7617              
7618              
7619              
7620             =head2 plsvect
7621              
7622             =for sig
7623              
7624             Signature: (arrowx(npts); arrowy(npts); int fill())
7625             Types: (double)
7626              
7627             =for usage
7628              
7629             plsvect($arrowx, $arrowy, $fill); # all arguments given
7630             $arrowx->plsvect($arrowy, $fill); # method call
7631              
7632             =for ref
7633              
7634             Give zero-length PDLs for arrowx and arrowy to pass NULL to PLplot func.
7635              
7636             =pod
7637              
7638             Broadcasts over its inputs.
7639             Can't use POSIX threads.
7640              
7641             =for bad
7642              
7643             C does not process bad values.
7644             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7645              
7646             =cut
7647              
7648              
7649              
7650              
7651             *plsvect = \&PDL::plsvect;
7652              
7653              
7654              
7655              
7656              
7657              
7658             =head2 plhlsrgb
7659              
7660             =for sig
7661              
7662             Signature: (double h();double l();double s();double [o]p_r();double [o]p_g();double [o]p_b())
7663             Types: (double)
7664              
7665             =for usage
7666              
7667             ($p_r, $p_g, $p_b) = plhlsrgb($h, $l, $s);
7668             plhlsrgb($h, $l, $s, $p_r, $p_g, $p_b); # all arguments given
7669             ($p_r, $p_g, $p_b) = $h->plhlsrgb($l, $s); # method call
7670             $h->plhlsrgb($l, $s, $p_r, $p_g, $p_b);
7671              
7672             =for ref
7673              
7674             info not available
7675              
7676             =pod
7677              
7678             Broadcasts over its inputs.
7679             Can't use POSIX threads.
7680              
7681             =for bad
7682              
7683             C does not process bad values.
7684             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7685              
7686             =cut
7687              
7688              
7689              
7690              
7691             *plhlsrgb = \&PDL::plhlsrgb;
7692              
7693              
7694              
7695              
7696              
7697              
7698             =head2 plgcol0
7699              
7700             =for sig
7701              
7702             Signature: (int icolzero(); int [o]r(); int [o]g(); int [o]b())
7703             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
7704             float double ldouble)
7705              
7706             =for usage
7707              
7708             ($r, $g, $b) = plgcol0($icolzero);
7709             plgcol0($icolzero, $r, $g, $b); # all arguments given
7710             ($r, $g, $b) = $icolzero->plgcol0; # method call
7711             $icolzero->plgcol0($r, $g, $b);
7712              
7713             =for ref
7714              
7715             info not available
7716              
7717             =pod
7718              
7719             Broadcasts over its inputs.
7720             Can't use POSIX threads.
7721              
7722             =for bad
7723              
7724             C does not process bad values.
7725             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7726              
7727             =cut
7728              
7729              
7730              
7731              
7732             *plgcol0 = \&PDL::plgcol0;
7733              
7734              
7735              
7736              
7737              
7738              
7739             =head2 plgcolbg
7740              
7741             =for sig
7742              
7743             Signature: (int [o]r(); int [o]g(); int [o]b())
7744             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
7745             float double ldouble)
7746              
7747             =for usage
7748              
7749             ($r, $g, $b) = plgcolbg();
7750             plgcolbg($r, $g, $b); # all arguments given
7751             $r->plgcolbg($g, $b);
7752              
7753             =for ref
7754              
7755             info not available
7756              
7757             =pod
7758              
7759             Broadcasts over its inputs.
7760             Can't use POSIX threads.
7761              
7762             =for bad
7763              
7764             C does not process bad values.
7765             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7766              
7767             =cut
7768              
7769              
7770              
7771              
7772             *plgcolbg = \&PDL::plgcolbg;
7773              
7774              
7775              
7776              
7777              
7778              
7779             =head2 plscmap0
7780              
7781             =for sig
7782              
7783             Signature: (int r(n); int g(n); int b(n))
7784             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
7785             float double ldouble)
7786              
7787             =for usage
7788              
7789             plscmap0($r, $g, $b); # all arguments given
7790             $r->plscmap0($g, $b); # method call
7791              
7792             =for ref
7793              
7794             info not available
7795              
7796             =pod
7797              
7798             Broadcasts over its inputs.
7799             Can't use POSIX threads.
7800              
7801             =for bad
7802              
7803             C does not process bad values.
7804             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7805              
7806             =cut
7807              
7808              
7809              
7810              
7811             *plscmap0 = \&PDL::plscmap0;
7812              
7813              
7814              
7815              
7816              
7817              
7818             =head2 plscmap1
7819              
7820             =for sig
7821              
7822             Signature: (int r(n); int g(n); int b(n))
7823             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
7824             float double ldouble)
7825              
7826             =for usage
7827              
7828             plscmap1($r, $g, $b); # all arguments given
7829             $r->plscmap1($g, $b); # method call
7830              
7831             =for ref
7832              
7833             info not available
7834              
7835             =pod
7836              
7837             Broadcasts over its inputs.
7838             Can't use POSIX threads.
7839              
7840             =for bad
7841              
7842             C does not process bad values.
7843             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7844              
7845             =cut
7846              
7847              
7848              
7849              
7850             *plscmap1 = \&PDL::plscmap1;
7851              
7852              
7853              
7854              
7855              
7856              
7857             =head2 plgcol0a
7858              
7859             =for sig
7860              
7861             Signature: (int icolzero(); int [o]r(); int [o]g(); int [o]b(); double [o]a())
7862             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
7863             float double ldouble)
7864              
7865             =for usage
7866              
7867             ($r, $g, $b, $a) = plgcol0a($icolzero);
7868             plgcol0a($icolzero, $r, $g, $b, $a); # all arguments given
7869             ($r, $g, $b, $a) = $icolzero->plgcol0a; # method call
7870             $icolzero->plgcol0a($r, $g, $b, $a);
7871              
7872             =for ref
7873              
7874             info not available
7875              
7876             =pod
7877              
7878             Broadcasts over its inputs.
7879             Can't use POSIX threads.
7880              
7881             =for bad
7882              
7883             C does not process bad values.
7884             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7885              
7886             =cut
7887              
7888              
7889              
7890              
7891             *plgcol0a = \&PDL::plgcol0a;
7892              
7893              
7894              
7895              
7896              
7897              
7898             =head2 plgcolbga
7899              
7900             =for sig
7901              
7902             Signature: (int [o]r(); int [o]g(); int [o]b(); double [o]a())
7903             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
7904             float double ldouble)
7905              
7906             =for usage
7907              
7908             ($r, $g, $b, $a) = plgcolbga();
7909             plgcolbga($r, $g, $b, $a); # all arguments given
7910             $r->plgcolbga($g, $b, $a);
7911              
7912             =for ref
7913              
7914             info not available
7915              
7916             =pod
7917              
7918             Broadcasts over its inputs.
7919             Can't use POSIX threads.
7920              
7921             =for bad
7922              
7923             C does not process bad values.
7924             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7925              
7926             =cut
7927              
7928              
7929              
7930              
7931             *plgcolbga = \&PDL::plgcolbga;
7932              
7933              
7934              
7935              
7936              
7937              
7938             =head2 plscmap0a
7939              
7940             =for sig
7941              
7942             Signature: (int r(n); int g(n); int b(n); double a(n))
7943             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
7944             float double ldouble)
7945              
7946             =for usage
7947              
7948             plscmap0a($r, $g, $b, $a); # all arguments given
7949             $r->plscmap0a($g, $b, $a); # method call
7950              
7951             =for ref
7952              
7953             info not available
7954              
7955             =pod
7956              
7957             Broadcasts over its inputs.
7958             Can't use POSIX threads.
7959              
7960             =for bad
7961              
7962             C does not process bad values.
7963             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
7964              
7965             =cut
7966              
7967              
7968              
7969              
7970             *plscmap0a = \&PDL::plscmap0a;
7971              
7972              
7973              
7974              
7975              
7976              
7977             =head2 plscmap1a
7978              
7979             =for sig
7980              
7981             Signature: (int r(n); int g(n); int b(n); double a(n))
7982             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
7983             float double ldouble)
7984              
7985             =for usage
7986              
7987             plscmap1a($r, $g, $b, $a); # all arguments given
7988             $r->plscmap1a($g, $b, $a); # method call
7989              
7990             =for ref
7991              
7992             info not available
7993              
7994             =pod
7995              
7996             Broadcasts over its inputs.
7997             Can't use POSIX threads.
7998              
7999             =for bad
8000              
8001             C does not process bad values.
8002             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
8003              
8004             =cut
8005              
8006              
8007              
8008              
8009             *plscmap1a = \&PDL::plscmap1a;
8010              
8011              
8012              
8013              
8014              
8015              
8016             =head2 plscmap1la
8017              
8018             =for sig
8019              
8020             Signature: (int itype(); isty(n); coord1(n); coord2(n); coord3(n); coord4(n); int rev(nrev))
8021             Types: (double)
8022              
8023             =for usage
8024              
8025             plscmap1la($itype, $isty, $coord1, $coord2, $coord3, $coord4, $rev); # all arguments given
8026             $itype->plscmap1la($isty, $coord1, $coord2, $coord3, $coord4, $rev); # method call
8027              
8028             =for ref
8029              
8030             Set color map1 colors using a piece-wise linear relationship, include alpha channel
8031              
8032             =pod
8033              
8034             Broadcasts over its inputs.
8035             Can't use POSIX threads.
8036              
8037             =for bad
8038              
8039             C does not process bad values.
8040             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
8041              
8042             =cut
8043              
8044              
8045              
8046              
8047             *plscmap1la = \&PDL::plscmap1la;
8048              
8049              
8050              
8051              
8052              
8053              
8054             =head2 plgfont
8055              
8056             =for sig
8057              
8058             Signature: (int [o]p_family(); int [o]p_style(); int [o]p_weight())
8059             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
8060             float double ldouble)
8061              
8062             =for usage
8063              
8064             ($p_family, $p_style, $p_weight) = plgfont();
8065             plgfont($p_family, $p_style, $p_weight); # all arguments given
8066             $p_family->plgfont($p_style, $p_weight);
8067              
8068             =for ref
8069              
8070             info not available
8071              
8072             =pod
8073              
8074             Broadcasts over its inputs.
8075             Can't use POSIX threads.
8076              
8077             =for bad
8078              
8079             C does not process bad values.
8080             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
8081              
8082             =cut
8083              
8084              
8085              
8086              
8087             *plgfont = \&PDL::plgfont;
8088              
8089              
8090              
8091              
8092              
8093              
8094             =head2 plsfont
8095              
8096             =for sig
8097              
8098             Signature: (int family(); int style(); int weight())
8099             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
8100             float double ldouble)
8101              
8102             =for usage
8103              
8104             plsfont($family, $style, $weight); # all arguments given
8105             $family->plsfont($style, $weight); # method call
8106              
8107             =for ref
8108              
8109             info not available
8110              
8111             =pod
8112              
8113             Broadcasts over its inputs.
8114             Can't use POSIX threads.
8115              
8116             =for bad
8117              
8118             C does not process bad values.
8119             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
8120              
8121             =cut
8122              
8123              
8124              
8125              
8126             *plsfont = \&PDL::plsfont;
8127              
8128              
8129              
8130              
8131              
8132              
8133             =head2 plcalc_world
8134              
8135             =for sig
8136              
8137             Signature: (double rx(); double ry(); double [o]wx(); double [o]wy(); int [o]window())
8138             Types: (sbyte byte short ushort long ulong indx ulonglong longlong
8139             float double ldouble)
8140              
8141             =for usage
8142              
8143             ($wx, $wy, $window) = plcalc_world($rx, $ry);
8144             plcalc_world($rx, $ry, $wx, $wy, $window); # all arguments given
8145             ($wx, $wy, $window) = $rx->plcalc_world($ry); # method call
8146             $rx->plcalc_world($ry, $wx, $wy, $window);
8147              
8148             =for ref
8149              
8150             info not available
8151              
8152             =pod
8153              
8154             Broadcasts over its inputs.
8155             Can't use POSIX threads.
8156              
8157             =for bad
8158              
8159             C does not process bad values.
8160             It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
8161              
8162             =cut
8163              
8164              
8165              
8166              
8167             *plcalc_world = \&PDL::plcalc_world;
8168              
8169              
8170              
8171              
8172              
8173             #line 5346 "plplot.pd"
8174              
8175             =head2 pl_cmd
8176              
8177             =for sig
8178              
8179             pl_cmd($CMD, $data);
8180              
8181             =for ref
8182              
8183             See the PLplot manual for reference.
8184             Gives access to low level driver. $CMD is an integer. $data opaque data.
8185              
8186             =cut
8187              
8188             #line 5371 "plplot.pd"
8189              
8190             =head2 pl_setCairoCtx
8191              
8192             =for sig
8193              
8194             pl_setCairoCtx($cairo_context);
8195              
8196             =for ref
8197              
8198             Used with cairo external drivers to set the cairo context.
8199             $cairo_context should be a Cairo::Context object.
8200             Uses pl_cmd underneath, but extracts the real C struct pointer from the Cairo::Context.
8201              
8202             =cut
8203              
8204             #line 5397 "plplot.pd"
8205              
8206             =pod
8207              
8208             =head1 WARNINGS AND ERRORS
8209              
8210             PLplot gives many errors and warnings. Some of these are given by the
8211             PDL interface while others are internal PLplot messages. Below are
8212             some of these messages, and what you need to do to address them:
8213              
8214             =over
8215              
8216             =item *
8217             Box must be a ref to a four element array
8218              
8219             When specifying a box, you must pass a reference to a
8220             four-element array, or use an anonymous four-element array.
8221              
8222             # Gives trouble:
8223             $pl->xyplot($x, $y, BOX => (0, 0, 100, 200) );
8224             # What you meant to say was:
8225             $pl->xyplot($x, $y, BOX => [0, 0, 100, 200] );
8226              
8227             =item *
8228             Too many colors used! (max 15)
8229              
8230             =back
8231              
8232             =head1 AUTHORS
8233              
8234             Doug Hunt
8235             Rafael Laboissiere
8236             David Mertens
8237              
8238             =head1 SEE ALSO
8239              
8240             perl(1), PDL(1), L
8241              
8242             The other common graphics packages include L
8243             and L.
8244              
8245             =cut
8246             #line 8247 "PLplot.pm"
8247              
8248             # Exit with OK status
8249              
8250             1;