The main commands used for operating with multiple devices, and their meanings are as follows:
Each new call to a device driver function opens a new graphics device, thus extending by one the device list. This device becomes the current device, to which graphics output will be sent.
Returns the number and name of all active devices. The device at position 1 on the list is always the ``null device'' which does not accept graphics commands at all.
Returns the number and name of the graphics device next to, or previous to the current device, respectively.
Can be used to change the current graphics device to the one at position k of the device list. Returns the number and label of the device.
Terminate the graphics device at point k of the device list. For some devices, such as postscript devices, this will either print the file immediately or correctly complete the file for later printing, depending on how the device was initiated.
Make a copy of the device k. device is a device function, such as postscript, with extra arguments, if needed, specified by .... dev.print is similar, but the copied device is immediately closed, so that end actions, such as printing hardcopies, are immediately performed. (See also printgraph()).
Terminate all graphics devices on the list, except the null device.