dev.copy(device, ..., which = dev.next()) dev.print(device = postscript, ...) dev.control("inhibit")
dev.print starts a graphics device given by device and copies the graph from the current graphics device onto this new graphics device then turns off the new graphics device.
dev.control allows you to turn off the internal display list kept for the current graphics device. This saves memory, but disables dev.copy and dev.print.
If you know you will not be using dev.print or dev.copy with the current graphics device, and you find that your plots are taking a lot of memory, you can use the S-PLUS expression dev.control("inhibit") after starting your device, and S-PLUS will not maintain a display list for the graphics device. If you want to turn the display list back on, you must restart the graphics driver. This internal display list contains a record of graphics done since the last time the drawing area was cleared, and is necessary for dev.print and dev.copy to work.
X11() tsplot(lynx, col=3) dev.copy(device=X11, xcm.vlight) title("The Copied Lynx Plot") dev.print(postscript, command="lpr -dPost")