| 4.3.lims.and.scales.handlers {loa} | R Documentation |
Plot lims and scales handlers
Description
In development functions for lims and scales handling with lattice plots.
Usage
limsHandler(x=NULL, y=NULL, z=NULL, ..., lim.borders = 0.05)
localScalesHandler(scales = NULL, ..., allowed.scales =c("x", "y"),
disallowed.scales = NULL, remove.box = FALSE)
panel.localScale(x.loc, y.loc, lim, ..., panel.scale = NULL,
label.before = TRUE, x.offset = NULL, y.offset = NULL,
axis = TRUE, ticks = TRUE, annotation = TRUE)
yscale.component.log10(...)
xscale.component.log10(...)
Arguments
x, y, z |
|
lim.borders |
numeric vector, giving the relative border to
extend |
scales, panel.scale |
A list of elements like the |
... |
Additional arguments. |
allowed.scales |
A character vector containing the names of the axes to be generated for as part of a local axis. |
disallowed.scales |
A character vector containing the names
of any axes that are not required. Note: If found, these are
removed from |
remove.box |
A logical, default |
x.loc, y.loc, lim |
two member vectors setting the |
label.before, x.offset, y.offset |
Scale annotation overrides.
|
axis, ticks, annotation |
If supplied, fine controls for the
appearance of the axis line, axis tick marks and axis annotation
on the generated scale. These can be vectors, in which they are
assumed to be color assignments, or lists of common plot parameters,
such as |
Details
limsHander generates xlim, ylim and/or zlim
ranges for axes or color scales for use in a range of plots.
localScalesHandler provides a relatively crude mechanism
for the removal of conventional lattice plot axes and
the generation of alternative axes using a panel... function
like panel.localScale.
Value
limsHandler returns a list containing ...lim ranges for
any of the elements x, y and/or z supplied to it.
localScalesHandler returns a list containing the
elements: scales, panel.scales and possibly
par.settings. scales turns off the standard
axes annotation. panel.scales is a list of named elements, one
per named axis, describing the axis layout. If
remove.box = TRUE, the additional argument par.settings
is also supplied.
All arguments should be passed on to the associated plot.
panel.scales or axis-specific elements in panel.scales
can then be evaluated by an associated panel... function run
from within the lattice plot call. This would typically
take the form:
panel.my.axis(panel.scale = panel.scale$axis, ...)
panel.localScale is a local axis/scale plotter. It can be used
in combination with localScalesHandler, and should called
once for each axis that is required, or it can be used 'stand alone'
panel to add a local scale to a lattice plot.
yscale.component.log10 and xscale.component.log10 are
simple axis transforms for use with log to the base 10 transformed
plot axes.
Note
panel.localScale is currently in revision. Scale arrows are
currently not available.
Author(s)
Karl Ropkins
References
These function makes extensive use of code developed by others.
lattice: Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization with R. Springer, New York. ISBN 978-0-387-75968-5
See Also
In other packages: xyplot in lattice.
Examples
## See trianglePlot Example 2 for example application