PGPLOT devices are specified in the standard PGPLOT manner, namely
device=name/typeThe 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:
% lp filename
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.