什么是空图形设备? [英] What is a null graphics device?

查看:175
本文介绍了什么是空图形设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读?devAskNewPage R 帮助页面(它从?相提并论......问)。我无法理解 par(ask = F) / par(ask = T)是否存在。



我需要了解以下内容才能理解这一点:

 如果当前设备是空设备,这将打开一个
图形设备。

...

用户被要求确认
新页面的确切情况取决于图形子系统。显然这需要
作为交互式会话。此外,记录操作需要为
,所以只有当显示列表启用时(请参阅
'dev.control'),它通常只在屏幕设备上显示。

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



这个感觉有点像学习标准输出和标准输入是什么。每个人都用这个词,但很难找到定义(这也很难理解)。我搜索了空白图形设备,最后的结果没有向我解释,作为一个新手,我需要知道,以便知道去哪里寻找。



<只要一些链接到适当的介绍性阅读就足够了。谢谢。

解决方案

在R中, device 产生图形图。这可以用来屏蔽(例如 windows )或各种文件类型(例如 png pdf tiff 等)。



帮助文件在设备上,请参阅?设备。三种主要操作系统的默认设备是:


  • MS Windows: windows

  • Unix: X11

  • OS X: quartz
  • code


空设备表示没有设备处于活动状态。这是一段简短的代码序列,用于查明我是否有一个开放的设备( dev.cur )并关闭它( dev.off )。当我关闭它时,其余设备是空设备。

 > dev.cur()
windows
2

> dev.off(2)
null设备
1

> dev.cur()
null设备
1

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

  • 基本图形
  • <$ c $ (包括格和 ggplot2

  • rgl 在包 rgl

  • ul>

    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.

    解决方案

    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

    这篇关于什么是空图形设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆