What is a null graphics device?

坚强是说给别人听的谎言 提交于 2019-11-30 19:06:16

In R, a device is the mechanism to produce graphical plots. This can be to screen (e.g. windows ) or to a variety of file types (e.g. png, pdf, tiff, etc).

For an entry point to the help file on devices, see ?Devices. The default devices for the three main operating systems are:

  • MS Windows: windows
  • Unix: X11
  • OS X: quartz

The null device means that no device is active. Here is a short code sequence that I used to find out whether I had an open device (dev.cur) and close it (dev.off). When I closed it, the remaining device was the null device.

> dev.cur()
windows 
      2 

> dev.off(2)
null device 
          1 

> dev.cur()
null device 
          1 

The meaning of graphics sybsystem is a bit more unclear. This seems to be the only page in all of help that uses the term. Thus I am guessing that the following are graphics subsystems:

  • base graphics
  • grid graphics (and anything built on top, including lattice and ggplot2)
  • rgl in package rgl
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!