List of Graphical Devices

The following graphics devices are currently available:

    #ifdef windows
  • windowsThe graphics device for Windows (on screen, to printer and to Windows metafile). #endif
  • pdfWrite PDF graphics commands to a file
  • postscriptWrites PostScript graphics commands to a file
  • xfigDevice for XFIG graphics file format
  • bitmapbitmap pseudo-device viaGhostscript(if available).
  • pictexWrites TeX/PicTeX graphics commands to a file (of historical interest only)
The following devices will be functional if Rwas compiled to use them (they exist but will return with a warning on other systems):
    #ifdef unix
  • X11The graphics device for the X11 windowing system #endif
  • cairo_pdf,cairo_psPDF and PostScript devices based on cairo graphics.
  • svgSVG device based on cairo graphics.
  • pngPNG bitmap device
  • jpegJPEG bitmap device
  • bmpBMP bitmap device
  • tiffTIFF bitmap device #ifdef unix
  • quartzThe 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.appGUI and from the command line: but it will display on the local screen even for a remote session.) #endif


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 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 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

See Also

The individual help files for further information on any of the devices listed here; #ifdef windows 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,, image, dev2bitmap. #ifdef unix

capabilities to see if X11, jpeg png, tiff, quartz and the cairo-based devices are available. #endif

  • Devices
  • device
library(grDevices) ## open the default screen device on this platform if no device is ## open if(dev.cur() == 1)
Documentation reproduced from package grDevices, version 3.3, License: Part of R 3.3

Community examples

Looks like there are no examples yet.