什么是空图形设备?

发布于 2024-12-18 14:41:49 字数 835 浏览 2 评论 0原文

我正在阅读 ?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 文件和写入屏幕之间的区别吗?

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

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

I'm reading the R help page for ?devAskNewPage (it was linked from ?par...ask). I can't understand what par(ask=F) / par(ask=T) does.

What do I need to read about to understand this:

 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.

What are devices, what is the null device, and what is a graphics subsystem? What is 'recording'? Are we talking about the difference between writing to png file and writing to the screen?

This feels a bit like learning what standard output and standard input are. Everybody uses the words but it was hard to find the definition (it was also hard to understand it). I googled for "null graphics device" and the top results don't explain to me, as a novice, what I need to know, in order to know where to look.

Just some links to the proper introductory reading would suffice. Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忱杏 2024-12-25 14:41:49

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

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

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

空设备< /strong> 表示没有设备处于活动状态。这是一个简短的代码序列,我用它来查明我是否有一个打开的设备 (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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文