rawXLim
returns the current plot limits, on a numeric, linear scale.
This is as simple as:
playDo(playState, space=space, list(
x=convertX(unit(0:1, "npc"), "native", valueOnly=TRUE),
y=convertY(unit(0:1, "npc"), "native", valueOnly=TRUE)))
except that the default space="plot"
will always return a value: if
it is a Lattice plot with multiple panels, one will be chosen arbitrarily.
The assignment form converts a numeric range, in the raw native plot coordinates, to values suitable for
the plot xlim
argument: it may convert back from log-transformed scales, and convert to factor levels if necessary.
It then updates the current plot call with the new value.
spaceCoordsToDataCoords
converts from the native viewport coordinates to the
data coordinates, which simply involves converting from a log scale if necessary.
dataCoordsToSpaceCoords
is the inverse case: applying a log transformation if necessary.
It used to refer to the position of data points in the viewport.