【问题标题】:What is a null graphics device?什么是空图形设备?
【发布时间】:2011-11-30 05:59:55
【问题描述】:

我正在阅读?devAskNewPageR 帮助页面(链接自?par...ask)。我不明白par(ask=F) / par(ask=T) 做了什么。

我需要阅读哪些内容才能理解这一点:

 If the current device is the null device, this will open a
 graphics device.

 ...

 The precise circumstances when the user will be asked to confirm a
 new page depend on the graphics subsystem.  Obviously this needs
 to be an interactive session.  In addition ‘recording’ needs to be
 in operation, so only when the display list is enabled (see
 ‘dev.control’) which it usually is only on a screen device.

什么是设备,什么是空设备,什么是图形子系统?什么是“录音”?我们是在讨论写入png 文件和写入屏幕的区别吗?

这感觉有点像学习什么是标准输出和标准输入。每个人都使用这些词,但很难找到定义(也很难理解)。我在谷歌上搜索了“空图形设备”,但作为一个新手,我并没有向我解释最重要的结果,我需要知道什么才能知道去哪里看。

只需一些链接到正确的介绍性阅读就足够了。谢谢。

【问题讨论】:

  • @joran 谢谢你,但我买不起这本书。

标签: r plot graphics sweave par


【解决方案1】:

在 R 中,device 是生成图形的机制。这可以是屏幕(例如windows)或各种文件类型(例如pngpdftiff等)。

有关设备帮助文件的入口点,请参阅?Devices。三种主要操作系统的默认设备是:

  • 微软视窗:windows
  • Unix:X11
  • OS X:quartz

null 设备 表示没有设备处于活动状态。这是一个简短的代码序列,我用它来确定我是否有一个打开的设备 (dev.cur) 并关闭它 (dev.off)。当我关闭它时,剩下的设备是空设备。

> dev.cur()
windows 
      2 

> dev.off(2)
null device 
          1 

> dev.cur()
null device 
          1 

graphics sybsystem的含义有点不清楚。这似乎是所有使用该术语的帮助中唯一的页面。因此我猜测以下是图形子系统:

  • 基本图形
  • grid 图形(以及任何构建在上面的东西,包括 latticeggplot2
  • rgl 包装内rgl

【讨论】:

  • 图形子系统似乎与设备类型有关,而不是与允许用户在设备上绘图的各种图形包有关。 ?dev.control 屏幕设备和其他设备之间的对比,关于交互式与批处理操作的注释可能也说明了预期的含义。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-02-05
  • 1970-01-01
  • 2011-11-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多