windows
The graphics device for Windows (on screen,
to printer and to Windows metafile).
#endifpdf
Write PDF graphics commands to a filepostscript
Writes PostScript graphics commands to
a filexfig
Device for XFIG graphics file formatbitmap
bitmap pseudo-device viaGhostscript
(if available).pictex
Writes TeX/PicTeX graphics commands to a
file (of historical interest only)X11
The graphics device for the X11 windowing system
#endifcairo_pdf
,cairo_ps
PDF and PostScript
devices based on cairo graphics.svg
SVG device based on cairo graphics.png
PNG bitmap devicejpeg
JPEG bitmap devicebmp
BMP bitmap devicetiff
TIFF bitmap device
#ifdef unixquartz
The graphics device for the OS X
native Quartz 2d graphics system. (This is only functional on
OS X where it can be used from theR.app
GUI and from the
command line: but it will display on the local screen even for a
remote session.)
#endifoptions("device")
which is initially set as the most
appropriate for each platform: a screen device for most interactive use and
pdf
(or the setting of pdf()
is used. It is possible for an Rpackage to provide further graphics devices
and several packages on CRAN do so. These include other devices outputting
SVG and PGF/TiKZ (TeX-based graphics, see
windows.options
,
#endif
#ifdef unix
X11.options
, quartz.options
,
#endif
ps.options
and pdf.options
for how to
customize devices. dev.interactive
,
dev.cur
, dev.print
,
graphics.off
, image
,
dev2bitmap
.
#ifdef unix
capabilities
to see if X11
,
jpeg
png
, tiff
,
quartz
and the cairo-based devices are available.
#endif
## open the default screen device on this platform if no device is
## open
if(dev.cur() == 1) dev.new()
Run the code above in your browser using DataLab