The DEVICE procedure provides device-dependent control over the current graphics device (as set by the SET_PLOT routine). The IDL graphics procedures and functions are device-independent. That is, IDL presents the user with a consistent interface to all devices. However, most devices have extra abilities that are not directly available through this interface. DEVICE is used to access and control such abilities. It is used by specifying various keywords that differ from device to device.

See IDL Graphics Devices for a description of the keywords available for each graphics device.

Calling Sequence



See Keywords Accepted by the IDL Devices .


The following example retains the name of the current graphics device, sets plotting to the PostScript device, makes a PostScript file, then resets plotting to the original device:

mydevice = !D.NAME ; ;The NAME field of the !D system variable contains the name of the current plotting device.

SET_PLOT, 'PS' ; ;Set plotting to PostScript.

; ;Use DEVICE to set some PostScript device options.

PLOT, FINDGEN(10) ; ;Make a simple plot to the PostScript file.

DEVICE, /CLOSE ; ;DEVICE closes the PostScript file.

SET_PLOT, mydevice ; ;Return plotting to the original device.