PDL::Graphics::PGPLOT (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
PDL::Graphics::PGPLOT - PGPLOT enhanced interface for PDLSYNOPSIS
pdl> $a = pdl [1..100] pdl> $b = sqrt($a) pdl> line $b pdl> hold Graphics on HOLD pdl> $c = sin($a/10)*2 + 4 pdl> line $c
DESCRIPTION
"PDL::Graphics::PGPLOT" is a convenience interface to theThe list of currently availably commands:
imag - Display an image (uses pgimag()/pggray() as appropriate) im - Shorthand to display an image with aspect ratio of 1 fits_imag - Display a FITS image with appropriate transforms & labels cont - Display image as contour map fits_cont - Display a FITS image in scientific coordinates as a contour map vect - Display 2 images as a vector field fits_vect - Display 2 FITS images in sci. coordinates as a vector field ctab - Load an image colour table ctab_info - Get information about currently loaded colour table line - Plot vector as connected points points - Plot vector as points errb - Plot error bars bin - Plot vector as histogram (e.g. bin(hist($data)) ) hi2d - Plot image as 2d histogram (not very good IMHO...) poly - Draw a polygon text - Write text in the plot area label_axes - Print axis titles legend - Create a legend with different texts, linestyles etc. cursor - Interactively read cursor positions. circle - Draw a circle ellipse - Draw an ellipse.
Device manipulation commands:
hold - Hold current plot window range - allows overlays etc. release - Release back to autoscaling of new plot window for each command rel - short alias for 'release' env - Define a plot window, put on 'hold' dev - Explicitly set a new PGPLOT graphics device new_window - Create a new plot window (use of dev is recommended) focus_window - Change focus to a new window window_list - Get a list of currently existing plot windows close_window - Close an open window
FUNCTIONS
The following is a list of the functions that are private to this package, for the other functions please read the PDL::Graphics::PGPLOT::Window documentation.dev
Open
Usage: dev $device, [$nx,$ny, $opt];
$device is a
The result of this command can be modified using options. The options recognised are the same as for "new_window" - which primarily and in addition it is possible to set the default values for a window that are defined in PDL::Graphics::PGPLOTOptions, see this for details but see below for a synopsis.
In addition "dev" recognises the option "NewWindow" which allows the user to specify that a "dev" command is to create a new window rather than closing the previous. This allows a large number of output destinations to be open at the same time, which occasionally can be convenient.
Here is a quick summary of the most useful additional options that can be given:
- Device
- Alternative to $device.
- AspectRatio
- The aspect ratio of the output window
- WindowWidth
- The width of the plot window in inches
- AxisColour
- The axis colour to be used as default for plots in this window. In the same way it is possible to set the default character size ("CharSize") and axis and box styles. See PDL::Graphics::PGPLOTOptions for details.
- WindowName
-
The name of a window. This name can subsequently be used to refer to the
window instead of its ID,making interactive use somewhat more intuitive.
To open a X-window output that will stay on screen:
$win = dev('/xs');
To open two windows, one small and square, one large and wide:
$win1 = dev('/xs', {Aspect => 1, WindowWidth => 4}); $win2 = dev('/xs', {Aspect => 0.5, WindowWidth => 10});
new_window
Open a
$win = new_window($dev, $nx, $ny, $opt);
This function is identical to dev except that it always creates a new window. This means that the user is required to close all windows explicitly using close_window. All functionality is otherwise like "dev" so see the documentation for dev for details of use.
close_window
Close a
Usage: close_window($id)
This function closes a
_get_windownumber
Internal function to obtain thefocus_window
Switch to another output window.
Usage: focus_window($id);
This command is used to switch output focus to another window created by dev or new_window. The window can be referred to either by its
$win1 = dev('/xs', {WindowName => 'X-output'}); $win2 = dev('test.ps/ps', {WindowName => 'PS-output'}); focus_window('X-output'); # Or focus_window($win1); <.. Commands ..> focus_window($win2); # Or focus_window('PS-output'); <.. Commands ..>
window_list
Return a list of
Usage: ($numbers, $names)=window_list();
$numbers and $names are anonymous arrays giving the