PGPLOT Plotting Devices

Tasks which use the PGPLOT software always use the device keyword to allow you to select a plotting device. Only a brief review of PGPLOT, from a users perspective, is given here. A more complete description, both for users and programmers, can be found in the PGPLOT manual.

PGPLOT devices are specified in the standard PGPLOT manner, namely

device=name/type
The name part either gives a device name (usually for graphics devices) or a file name (usually for hardcopy devices, such as postscript printers). In the case of a file name, any normal file name can be given. However if it contains a / character, then the entire file name should be enclosed in double quotes ("). Once a file has been created, you will generally have to issue operating system commands to spool this to the appropriate output plotter, etc. The name part can often be left blank - it defaults to something sensible. The most common case where you do not let it default is when you are specifying a disk plot file.

The type part tells PGPLOT what sort of graphics or hardcopy device is being used. Minimum match is used. Some possible types are:

xs
This is a re-sizable and persistent X window.

xw
This is a transient X window.

xd
This is the pgdisp X windows server (deprecated).

ps
Postscript. PGPLOT will write the plot as a disk file in postscript form. At ATNF sites, you can print this postscript file with the command:
% lp filename

vps
Vertical postscript. The only difference between this and ps, is that vps generates a plot in portrait mode, whereas ps is in landscape mode.

cps
Colour postscript in landscape mode.

vcps
Colour postscript in portrait mode.

null
The null device. Useful for debugging when you do not have a display.

re
A VT100 with RETROgraphics card.

v603
A V603 terminal.

krm3
A Kermit 3 IBM-PC terminal emulator.

tek
A TEK 4010 compatible terminal (or window).

Examples of PGPLOT devices are:

Another useful pseudo-PGPLOT device is ?. This causes a complete list of PGPLOT types to be printed, and then the task will prompt you to give a PGPLOT device.

When plotting in an X window, you must meet the conditions which allow PGPLOT to communicate with your X server.

PGPLOT has two X windows servers, and as of PGPLOT V5.0, one of which (pgdisp) is deprecated. The PGPLOT device types /xs and /xd are now mediated by a server (called pgxwin_server). This server is automatically started whenever either of these devices is invoked. The /xs windows are permanent and resizable whereas the fixed size /xw windows disappear as the application terminates. This server allows multiple windows and you can choose to write to whichever one you like (see above example). The resources for these windows are managed through the standard X windows resource file.

The deprecated server, pgdisp, which creates a resizable persistent X window is started by hand with a command such as

% pgdisp &

from a workstation window (usually the console window). This window is written to with the keyword device, see below). This window can be used for line graphics as well as grey scales. By default, the pgdisp window only has 16 colour levels, which is insufficient for most image display applications, but fine for line graphics.

If you start it up with the command

   % pgdisp -lineColors 128  &

then the window will be allocated 128 colours which is sufficient for imaging applications. This window is much slower than the windows mediated by the pgxwin_server. In addition you can only have one.

Miriad manager
2016-06-21