\Header{Devices}{List of Graphical Devices}
\alias{dev.interactive}{Devices}
\alias{device}{Devices}
\keyword{device}{Devices}
\begin{Description}\relax
The following graphics devices are currently available:
\Itemize{
\item \code{\Link{postscript}} Writes PostScript graphics commands to
a file
\item \code{\Link{pdf}} Write PDF graphics commands to a file
\item \code{\Link{pictex}} Writes LaTeX/PicTeX graphics commands to a
file
\item \code{\Link{xfig}} Device for XFIG graphics file format
\item \code{\Link{bitmap}} bitmap pseudo-device via
\code{GhostScript} (if available).
}
The following devices will be available if \R{} was compiled to use them
and started with the appropriate \option{--gui} argument:
\Itemize{
\item \code{\Link{X11}} The graphics driver for the X11 Window
system
\item \code{\Link{png}} PNG bitmap device
\item \code{\Link{jpeg}} JPEG bitmap device
\code{\Link{GNOME}} Graphics driver for the GNOME GUI.
}
None of these are available under \code{R CMD \Link{BATCH}}.
\end{Description}
\begin{Usage}
\begin{verbatim}
X11(...)
postscript(...)
pdf(...)
pictex(...)
png(...)
jpeg(...)
GNOME(...)
xfig(...)
bitmap(...)

dev.interactive()
\end{verbatim}
\end{Usage}
\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{\Link{options}("device")} which is initially set as the most
appropriate for each platform: a screen device for most interactive use and
\code{\Link{postscript}} otherwise. The exception is  interactive
use under Unix if no screen device is known to be available, when
postscript() is used for most systems; pdf() for Mac OS X.
\end{Details}
\begin{Value}
\code{dev.interactive()} returns a logical, \code{TRUE} iff an
interactive (screen) device is in use.
\end{Value}
\begin{SeeAlso}\relax
The individual help files for further information on any of the
devices listed here;

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

\code{\Link{capabilities}} to see if \code{\Link{X11}}, \code{\Link{jpeg}}
and \code{\Link{png}} 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) get(getOption("device"))()
## End(Not run)\end{ExampleCode}
\end{Examples}

