| Devices {base} | R Documentation |
List of Graphical Devices
Description
The following graphics devices are currently available:
-
postscriptWrites PostScript graphics commands to a file -
pdfWrite PDF graphics commands to a file -
pictexWrites LaTeX/PicTeX graphics commands to a file -
xfigDevice for XFIG graphics file format -
bitmapbitmap pseudo-device viaGhostScript(if available).
The following devices will be available if R was compiled to use them
and started with the appropriate --gui argument:
-
X11The graphics driver for the X11 Window system -
pngPNG bitmap device -
jpegJPEG bitmap device -
GTK,GNOMEGraphics drivers for the GNOME GUI.
None of these are available under R CMD BATCH.
Usage
X11(...)
postscript(...)
pdf(...)
pictex(...)
png(...)
jpeg(...)
GTK(...)
GNOME(...)
xfig(...)
bitmap(...)
dev.interactive()
Details
If no device is open, using a high-level graphics function will cause
a device to be opened. Which device is given by
options("device") which is initially set as the most
appropriate for each platform: a screen device in interactive use and
postscript otherwise.
Value
dev.interactive() returns a logical, TRUE iff an
interactive (screen) device is in use.
See Also
The individual help files for further information on any of the devices listed here;
dev.cur, dev.print,
graphics.off, image,
dev2bitmap.
capabilities to see if X11, jpeg
and png are available.
Examples
## 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)