NAME

SYNOPSIS

DESCRIPTION

PDL::Graphics::PGPLOT is a convenience interface to the PGPLOT commands, implemented using the object oriented PGPLOT plotting package in PDL::Graphics::PGPLOT::Window. See the documentation for that package for in-depth information about the usage of these commands and the options they accept.

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 exisiting 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 PGPLOT graphics device

Usage: dev $device, [$nx,$ny, $opt];

$device is a PGPLOT graphics device such as "/xserve" or "/ps", if omitted defaults to last used device (or value of env var PGPLOT_DEV if first time). $nx, $ny specify sub-panelling. The function returns the id of the newly created window - this can subsequently be used as argument to focus_window to select the window.

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.

new_window

Open a PGPLOT graphics device

$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 PGPLOT output device

Usage: close_window($id)

This function closes a PGPLOT output device created with dev or new_window. It requires the id of the window to close. If $id is left undefined, the currently focussed window is deleted and focus is transferred to the lowest numbered window in existence. If many windows have been created and deleted this might not be what you expect, so it is recommended to make an explicit call to focus_window after any call to close_window.

_get_windownumber

Internal function to obtain the ID of a window. This allows the user to refer to a window with its name.

focus_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 ID or by its name.