Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Screen Devices

A new graphics device is created with any one of x11, windows, and quartz. Once a graphics device is opened, all further graphics commands relate to that device, until it is closed with the dev.off function. The graphics.off function closes all devices.

> x11()
> plot(rnorm(50))
> x11()
> plot(rnorm(10))
> dev.off()
X11
  2
> dev.off()
null device
          1

On screen devices you can sometimes print the plots directly from the right mouse button menu (depending on the operating system and the GUI). Once you have a plot drawn on a screen device you can always save the current plot to PDF with:

dev.print(pdf, file="rplot.pdf")



Copyright © Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
The PDF version is a formatted comprehensive draft book (with over 800 pages).
Brought to you by Togaware. This page generated: Sunday, 22 August 2010