The R Project SVN R

Rev

Rev 15168 | Rev 40615 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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