windowsThe graphics device for Windows (on screen,
    to printer and to Windows metafile).
#endifpdfWrite PDF graphics commands to a filepostscriptWrites PostScript graphics commands to
    a filexfigDevice for XFIG graphics file formatbitmapbitmap pseudo-device viaGhostscript(if available).pictexWrites TeX/PicTeX graphics commands to a
    file (of historical interest only)X11The graphics device for the X11 windowing system
#endifcairo_pdf,cairo_psPDF and PostScript
    devices based on cairo graphics.svgSVG device based on cairo graphics.pngPNG bitmap devicejpegJPEG bitmap devicebmpBMP bitmap devicetiffTIFF bitmap device
#ifdef unixquartzThe 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.)
#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