C_04_lattice.options {lattice} | R Documentation |
Low-level Options Controlling Behaviour of Lattice
Description
Functions to handle settings used by lattice. Their main purpose is to make code maintainance easier, and users normally should not need to use these functions. However, fine control at this level maybe useful in certain cases.
Usage
lattice.options(...)
lattice.getOption(name)
Arguments
name |
character giving the name of a setting |
... |
new options can be defined, or existing ones modified, using one or
more arguments of the form |
Details
These functions are modeled on options
and getOption
,
and behave similarly for the most part. Some of the available
components are documented here, but not all. The purpose of the ones
not documented are either fairly obvious, or not of interest to the
end-user.
panel.error
-
A function, or
NULL
. If the former, every call to the panel function will be wrapped insidetryCatch
with the specified function as an error handler. The default is to use thepanel.error
function. This prevents the plot from failing due to errors in a single panel, and leaving the grid operations in an unmanageable state. If set toNULL
, errors in panel functions will not be caught usingtryCatch
. save.object
-
Logical flag indicating whether a
"trellis"
object should be saved when plotted for subsequent retrieval and further manipulation. Defaults toTRUE
. layout.widths
,layout.heights
Controls details of the default space allocation in the grid layout created in the course of plotting a
"trellis"
object. Each named component is a list of arguments to the grid functionunit
(x
,units
, and optionallydata
).Usually not of interest to the end-user, who should instead use the similiarly named component in the graphical settings, modifiable using
trellis.par.set
.drop.unused.levels
A list of two components named
cond
anddata
, both logical flags. The flags indicate whether the unused levels of factors (conditioning variables and primary variables respectively) will be dropped, which is usually relevant when a subsetting operation is performed or an 'interaction' is created. Seexyplot
for more details. Note that this does not control dropping of levels of the 'groups' argument.legend.bbox
-
A character string, either
"full"
or"panel"
. This determines the interpretation ofx
andy
whenspace="inside"
inkey
(determining the legend; seexyplot
): either the full figure region ('"full"'), or just the region that bounds the panels and strips ('"panel"'). default.args
A list giving default values for various standard arguments:
as.table
,auto.key
,aspect
,between
,grid
,skip
,strip
,xscale.components
,yscale.components
, andaxis
.highlight.gpar
A list giving arguments to
gpar
used to highlight a viewport chosen usingtrellis.focus
.banking
The banking function. See
banking
.axis.padding
List with components named
"numeric"
and"factor"
, both scalar numbers. Panel limits are extended by this amount, to provide padding for numeric and factor scales respectively. The value for numeric is multiplicative, whereas factor is additive.skip.boundary.labels
Numeric scalar between 0 and 1. Tick marks that are too close to the limits are not drawn unless explicitly requested. The limits are contracted by this proportion, and anything outside is skipped.
interaction.sep
The separator for creating interactions with the extended formula interface (see
xyplot
).optimize.grid
Logical flag,
FALSE
by default. Complicated grid unit calculations can be slow. Sometimes these can be optimized at the cost of potential loss of accuracy. This option controls whether such optimization should be applied.axis.units
List determining default units for axis components. Should not be of interest to the end-user.
In addition, there is an option for the default prepanel and panel
function for each high-level function; e.g., panel.xyplot
and
prepanel.default.xyplot
for xyplot
. The options
for the others have similarly patterned names.
Value
lattice.getOption
returns the value of a single component,
whereas lattice.options
always returns a list with one or more
named components. When changing the values of components, the old
values of the modified components are returned by
lattice.options
. If called without any arguments, the full
list is returned.
Author(s)
Deepayan Sarkar Deepayan.Sarkar@R-project.org
See Also
options
, trellis.device
,
trellis.par.get
, Lattice
Examples
names(lattice.options())
str(lattice.getOption("layout.widths"), max.level = 2)
## Not run:
## change default settings for subsequent plots
lattice.options(default.args = list(as.table = TRUE,
grid = TRUE,
auto.key = TRUE))
## End(Not run)