This is a convenience function for producing a viewport with x- and/or y-scales based on numeric values passed to the function.
dataViewport(xData = NULL, yData = NULL, xscale = NULL,
yscale = NULL, extension = 0.05, ...)
A numeric vector of data.
A numeric vector of data.
A numeric vector (length 2).
A numeric vector (length 2).
A numeric. If length greater than 1, then first value is used to extend the xscale and second value is used to extend the yscale.
All other arguments will be passed to a call to
the viewport()
function.
A grid viewport object.
If xscale
is not specified then the values in x
are
used to generate an x-scale based on the range of x
, extended
by the proportion specified in extension
. Similarly for the
y-scale.
viewport
and
plotViewport
.