Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Copy and Print Devices

From a MS/Windows screen device you can choose from the right mouse button menu to Copy the graphics to the Clipboard as a MS/Metafile or Bitmap format, or else to save the graphics to a file as a Metafile or PostScript file. You can also directly print the graphic from the same menu. This functionality is not available on the X11 screen device under Unix and GNU/Linux.

Having interactively generated a graphic you can copy the graphic to any other device with the dev.copy function. R accomplishes this by keeping a so called display list which tracks the graphics operations used to draw the graphic. When a copy is requested, or the graphics needs to be redrawn, these graphics commands are executed.

> dev.set(3)
> dev.copy(pdf, file="currentplot.pdf")
> dev.off()

The recording of the graphics operations is enabled only for screen devices. The recording to the display list can be turned off, if memory is at a premium:

> dev.control("inhibit")



Copyright © 2004-2006 Graham.Williams@togaware.com
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.