R语言图像保存
来源:互联网 发布:换手率手机炒股软件 编辑:程序博客网 时间:2024/05/18 03:08
Control Multiple Devices
Description
These functions provide control over multiple graphics devices.
Usage
dev.cur()
dev.list()
dev.next(which = dev.cur())
dev.prev(which = dev.cur())
dev.off(which = dev.cur())
dev.set(which = dev.next())
dev.new(...)
graphics.off()
Arguments
which
An integer specifying a device number.
...
arguments to be passed to the device selected.
Details
Only one device is the ‘active’ device: this is the device in which all graphics operations occur. There is a "null device" which is always open but is really a placeholder: any attempt to use it will open a new device specified by getOption("device")).
Devices are associated with a name (e.g., "X11" or "postscript") and a number in the range 1 to 63; the "null device" is always device 1. Once a device has been opened the null device is not considered as a possible active device. There is a list of open devices, and this is considered as a circular list not including the null device. dev.next and dev.prev select the next open device in the appropriate direction, unless no device is open.
dev.off shuts down the specified (by default the current) device. If the current device is shut down and any other devices are open, the next open device is made current. It is an error to attempt to shut down device 1. graphics.off() shuts down all open graphics devices. Normal termination of a session runs the internal equivalent of graphics.off().
dev.set makes the specified device the active device. If there is no device with that number, it is equivalent to dev.next. If which = 1 it opens a new device and selects that.
dev.new opens a new device. Normally R will open a new device automatically when needed, but this enables you to open further devices in a platform-independent way. (For which device is used see getOption("device").) Note that care is needed with file-based devices such as pdf and postscript and in that case file names such as ‘Rplots.pdf’, ‘Rplots1.pdf’, ..., ‘Rplots999.pdf’ are tried in turn. Only named arguments are passed to the device, and then only if they match the argument list of the device. Even so, care is needed with the interpretation of e.g. width, and for the standard bitmap devices units = "in", res = 72 is forced if neither is supplied but both width and height are.
Value
dev.cur returns a length-one named integer vector giving the number and name of the active device, or 1, the null device, if none is active.
dev.list returns the numbers of all open devices, except device 1, the null device. This is a numeric vector with a names attribute giving the device names, or NULL is there is no open device.
dev.next and dev.prev return the number and name of the next / previous device in the list of devices. This will be the null device if and only if there are no open devices.
dev.off returns the number and name of the new active device (after the specified device has been shut down).
dev.set returns the number and name of the new active device.
dev.new returns the return value of the device opened, usually invisible NULL.
See Also
Devices, such as postscript, etc.
layout and its links for setting up plotting regions on the current device.
Examples
## Not run: ## Unix-specific example
x11()
plot(1:10)
x11()
plot(rnorm(10))
dev.set(dev.prev())
abline(0, 1) # through the 1:10 points
dev.set(dev.next())
abline(h = 0, col = "gray") # for the residual plot
dev.set(dev.prev())
dev.off(); dev.off() #- close the two X devices
## End(Not run)
- R语言图像保存
- R语言作图保存[保存]
- R语言图像处理
- R语言 读取图像
- R语言-图像处理
- #R语言#读入和保存
- R语言生成保存图片方法
- R语言之关于保存pdf,png
- R语言之作饼图并保存
- R语言相关文件保存执行abc
- [R语言]ggplot2画图保存方法
- R语言-加载与保存数据
- R语言绘制坐标 保存图片
- 用R语言绘制函数图像
- 使用R语言进行图像分类
- 用c语言保存bitmap图像
- [R语言] 如何保存命令和读取命令
- R语言直接保存图形而不显示图形
- UE注释的代码染色问题
- gcc查找头文件的规则
- JNI 学习笔记
- IOS开发~GCD
- 代码所有制(Code Ownership)
- R语言图像保存
- 代码碎片(1)
- Android学习笔记---26_采用JSON格式返回数据给资讯客户端,效率上要高于xml文件解析和传输
- JNI学习
- 领悟 JavaScript 中的面向对象
- TCP/IP OSI 网络层次介绍
- LWIP完全剖析详解之core/tcp.c
- cs硕士妹子找工作经历【阿里人搜等互联网】
- 一个合格的程序员应该读过哪些书