| Devices {grDevices} | R Documentation | 
List of Graphical Devices
Description
The following graphics devices are currently available:
- windows:
- On Windows only, the graphics device for Windows (on screen, to printer and to Windows metafile). 
- pdf:
- Write PDF graphics commands to a file. 
- postscript:
- Writes PostScript graphics commands to a file. 
- xfig:
- Device for XFig graphics file format. (Of historical interest only, deprecated in R 4.4.0.) 
- bitmap:
- bitmap pseudo-device via - Ghostscript(if available).
- pictex:
- Writes TeX/PicTeX graphics commands to a file (of historical interest only, deprecated in R 4.4.0). 
The following devices will be functional if R was compiled to use them (they exist but will return with a warning on other systems):
- cairo_pdf,- cairo_ps:
- PDF and PostScript devices based on cairo graphics. 
- svg:
- SVG device based on cairo graphics 
- png:
- PNG bitmap device 
- jpeg:
- JPEG bitmap device 
- bmp:
- BMP bitmap device 
- tiff:
- TIFF bitmap device 
On Unix-alikes (including macOS) only:
- X11:
- The graphics device for the X11 windowing system 
- quartz:
- The graphics device for the macOS native Quartz 2d graphics system. (This is only functional on macOS where it can be used from the - R.appGUI and from the command line: but it will display on the local screen even for a remote session.)
Details
If no device is open, calling any high-level graphics function will cause
a device to be opened.  Which device is determined by
options("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 R_DEFAULT_DEVICE)
otherwise.  The exception is interactive use under Unix if no screen
device is known to be available, when pdf() is used.
It is possible for an R package (or an R front-end such as RStudio) to provide further graphics devices and several packages on CRAN do so. These include devices outputting SVG (svglite and PGF/TiKZ (tikzDevice, TeX-based graphics, see https://pgf.sourceforge.net/).
See Also
The individual help files for further information on any of the devices listed here;
- on Windows:
- on a Unix-alike:
- X11.options,- quartz.options,
ps.options and pdf.options for how to
customize devices.
dev.interactive,
dev.cur, dev.print,
graphics.off, image,
dev2bitmap.
On Unix-alikes only:
capabilities to see if X11,
jpeg, png, tiff,
quartz and the cairo-based devices are available.
Examples
## Not run: 
## open the default screen device on this platform if no device is
## open
if(dev.cur() == 1) dev.new()
## End(Not run)