playwith
Application Programming Interface.xyCoords(playState, space = "plot")
xyData(playState, space = "plot")
playState
object representing the plot, window and device.space="page"
, the combined data from all panels is returned.
See the space
x
and y
, which are
numeric vectors in the case of xyCoords
.
For lattice plots, the output is similar to that returned by
trellis.panelArgs
, so can include elements such as
subscripts
.
In addition, the x
and y
vectors are recycled to the same length, and
coordinates of qqmath
plots are automatically
calculated.xyCoords
is analogous to xy.coords
.
xyData
is the same but does not convert the data to numeric.
Thus the returned data objects may be factors, time series, etc.playwith.API
if (interactive()) {
library(lattice)
x <- as.Date("1990-01-01") + 1:20 - 1
ab <- rep(c("a", "b"), each=10)
playwith(xyplot(1:20 ~ x | ab))
playState <- playDevCur()
xyCoords(playState, space="packet 2")
xyData(playState, space="packet 2")
xyData(playState, space="page")
}
Run the code above in your browser using DataLab