Search notes:

R graphics

Graphics can be produced interactively and in batch mode.
The commands to produce and manipulate graphics are broadly divided into three groups:

Devices

There can be multiple devices of which only one can be active. One device is the null device which is always open.
Devices are associated with a name (such as X11 or postscript) and a number in the range of 1 to 63 (the null device being 1).
When used interactively, R initiates a graphics device driver which in turn opens a graphics windows where the graphics are displayed. The commands that are (automatically) invoked are X11() on Unix, windows() on Windows and quartz() on Mac.
Each device has its own set of graphical parameters which can be set or queried with par().
New devices can always be opened with dev.new().
Other functions are dev.cur, dev.list, dev.next, dev.off, dev.set.

Packages

Base graphics is the original graphic system of R and is loaded when R is started.
It's main function is plot().
grid was added later. It allows to create viewports on a graphic page.
lattice and ggplot2 are built on grid.

See also

R functions for graphics
Saving graphics/plots to files
Data visualization with R
decoration
Coloring graphics with R

Index