\HeaderA{Devices}{List of Graphical Devices}{Devices}
\aliasA{device}{Devices}{device}
\keyword{device}{Devices}
\begin{Description}\relax
The following graphics devices are currently available:
\Itemize{
\item \code{\LinkA{postscript}{postscript}} Writes PostScript graphics commands to
a file
\item \code{\LinkA{pdf}{pdf}} Write PDF graphics commands to a file
\item \code{\LinkA{pictex}{pictex}} Writes LaTeX/PicTeX graphics commands to a
file
\item \code{\LinkA{xfig}{xfig}} Device for XFIG graphics file format
\item \code{\LinkA{bitmap}{bitmap}} bitmap pseudo-device via
\code{GhostScript} (if available).
}
The following devices will be functional if \R{} was compiled to use
them (they exist but will return with a warning on other systems):
\Itemize{
\item \code{\LinkA{X11}{X11}} The graphics device for the X11 Window system
\item \code{\LinkA{bmp}{bmp}} Windows bitmap device
\item \code{\LinkA{jpeg}{jpeg}} JPEG bitmap device
\item \code{\LinkA{png}{png}} PNG bitmap device
\item \code{\LinkA{tiff}{tiff}} TIFF bitmap device
\item \code{\LinkA{cairo\_pdf}{cairo.Rul.pdf}}, \code{cairo\_ps} PDF and PostScript
devices based on cairo graphics.

\item \code{\LinkA{quartz}{quartz}} The graphics device for the Mac OS X
native Quartz 2d graphics system.  (This is only functional on Mac
OS X, but unlike \R{} \textless{} 2.7.0 can be used from the command line and
not just from the GUI console.)
}
\end{Description}
\begin{Details}\relax
If no device is open, using a high-level graphics function will cause
a device to be opened.  Which device is given by
\code{\LinkA{options}{options}("device")} which is initially set as the most
appropriate for each platform: a screen device for most interactive use and
\code{\LinkA{pdf}{pdf}} (or the setting of \env{R\_DEFAULT\_DEVICE})
otherwise.  The exception is interactive use under Unix if no screen
device is known to be available, when \code{pdf()}is used.
\end{Details}
\begin{SeeAlso}\relax
The individual help files for further information on any of the
devices listed here;
\code{\LinkA{X11}{X11}.options}, \code{\LinkA{quartz.options}{quartz.options}},
\code{\LinkA{ps.options}{ps.options}} and \code{\LinkA{pdf.options}{pdf.options}} for how to
customize devices.

\code{\LinkA{dev.interactive}{dev.interactive}},
\code{\LinkA{dev.cur}{dev.cur}}, \code{\LinkA{dev.print}{dev.print}},
\code{\LinkA{graphics.off}{graphics.off}}, \code{\LinkA{image}{image}},
\code{\LinkA{dev2bitmap}{dev2bitmap}}.

\code{\LinkA{capabilities}{capabilities}} to see if \code{\LinkA{X11}{X11}}, \code{\LinkA{jpeg}{jpeg}}
\code{\LinkA{png}{png}} and \code{\LinkA{quartz}{quartz}} are available.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}## Not run: 
## open the default screen device on this platform if no device is
## open
if(dev.cur() == 1) dev.new()
## End(Not run)\end{ExampleCode}
\end{Examples}

