


Functions like plot in base, xyplot in lattice, or qplot in ggplot2 will default to sending a plot to the screen device.

There are also graphics devices that have been created by users and these are aviailable through packages on CRAN.įor quick visualizations and exploratory analysis, usually you want to use the screen device. The list of devices supported by your installation of R is found in ?Devices. When making a plot, you need to consider how the plot will be used to determine what device the plot should be sent to. On a Mac the screen device is launched with the quartz() function, on Windows the screen device is launched with windows() function, and on Unix/Linux the screen device is launched with x11() function. The most common place for a plot to be “sent” is the screen device. When you make a plot in R, it has to be “sent” to a specific graphics device. Examples includeĪ window on your computer (screen device)Ī scalable vector graphics (SVG) file (file device) Watch a video of this chapter: Part 1 Part 2Ī graphics device is something where you can make a plot appear.

2.2 Getting started with the R interface.
