xyCoords {playwith} | R Documentation |
Part of the playwith
Application Programming Interface.
xyCoords(playState, space = "plot") xyData(playState, space = "plot")
playState |
a playState object representing the plot, window and device. |
space |
character, the plot space for which to get data.
This is only relevant to multi-panel lattice plots, where data is split across panels.
In this case, if space="page" , the combined data from all panels is returned.
See the space argument to playDo . |
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.
the returned value is a list with elements 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.
Felix Andrews felix@nfrac.org
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") }