| 27442 |
ripley |
1 |
\name{dev.xxx}
|
|
|
2 |
\title{Control Multiple Devices}
|
|
|
3 |
\usage{
|
|
|
4 |
dev.cur()
|
|
|
5 |
dev.list()
|
|
|
6 |
dev.next(which = dev.cur())
|
|
|
7 |
dev.prev(which = dev.cur())
|
|
|
8 |
dev.off(which = dev.cur())
|
|
|
9 |
dev.set(which = dev.next())
|
|
|
10 |
graphics.off()
|
|
|
11 |
}
|
|
|
12 |
\alias{dev.cur}
|
|
|
13 |
\alias{dev.list}
|
|
|
14 |
\alias{dev.next}
|
|
|
15 |
\alias{dev.prev}
|
|
|
16 |
\alias{dev.off}
|
|
|
17 |
\alias{dev.set}
|
|
|
18 |
\alias{graphics.off}
|
|
|
19 |
|
|
|
20 |
\arguments{
|
|
|
21 |
\item{which}{An integer specifying a device number}
|
|
|
22 |
}
|
|
|
23 |
\description{
|
|
|
24 |
These functions provide control over multiple graphics devices.
|
|
|
25 |
|
|
|
26 |
Only one device is the \emph{active} device. This is the device in
|
|
|
27 |
which all graphics operations occur.
|
|
|
28 |
|
|
|
29 |
Devices are associated with a name (e.g., \code{"X11"} or
|
|
|
30 |
\code{"postscript"}) and a number; the \code{"null device"} is always
|
|
|
31 |
device 1.
|
|
|
32 |
|
|
|
33 |
\code{dev.off} shuts down the specified (by default the current) device.
|
|
|
34 |
\code{graphics.off()} shuts down all open graphics devices.
|
|
|
35 |
|
|
|
36 |
\code{dev.set} makes the specified device the active device.
|
|
|
37 |
}
|
|
|
38 |
\value{
|
|
|
39 |
\code{dev.cur} returns the number and name of the active device,
|
|
|
40 |
or 1, the null device, if none is active.
|
|
|
41 |
|
|
|
42 |
\code{dev.list} returns the numbers of all open devices, except device
|
|
|
43 |
1, the null device. This is a numeric vector with a names attribute
|
|
|
44 |
giving the names, or \code{NULL} is there is no open device.
|
|
|
45 |
|
|
|
46 |
\code{dev.next} and \code{dev.prev} return the number and name of the
|
|
|
47 |
next / previous device in the list of devices. The list is regarded as
|
|
|
48 |
a circular list, and \code{"null device"} will be included only if there
|
|
|
49 |
are no open devices.
|
|
|
50 |
|
|
|
51 |
\code{dev.off} returns the name and number of the new active device
|
|
|
52 |
(after the specified device has been shut down).
|
|
|
53 |
|
|
|
54 |
\code{dev.set} returns the name and number of the new active device.
|
|
|
55 |
}
|
|
|
56 |
\seealso{
|
|
|
57 |
\code{\link{Devices}}, such as \code{\link{postscript}}, etc;
|
|
|
58 |
\code{\link{layout}} and its links for setting up plotting regions
|
|
|
59 |
on the current device.
|
|
|
60 |
}
|
|
|
61 |
\examples{
|
|
|
62 |
\dontrun{## Unix-specific example
|
|
|
63 |
x11()
|
|
|
64 |
plot(1:10)
|
|
|
65 |
x11()
|
|
|
66 |
plot(rnorm(10))
|
|
|
67 |
dev.set(dev.prev())
|
|
|
68 |
abline(0,1)# through the 1:10 points
|
|
|
69 |
dev.set(dev.next())
|
|
|
70 |
abline(h=0, col="gray")# for the residual plot
|
|
|
71 |
dev.set(dev.prev())
|
|
|
72 |
dev.off(); dev.off()#- close the two X devices
|
|
|
73 |
}
|
|
|
74 |
}
|
|
|
75 |
\keyword{device}
|
|
|
76 |
\keyword{iplot}
|