trellis.par.get {lattice}R Documentation

Manipulating Graphical Parameters for Trellis Displays

Description

These functions are used to query and modify graphical parameters for fine control of Trellis displays.

Usage

trellis.par.get(name)
trellis.par.set(name, value)
show.settings()
trellis.settings

Arguments

name name of a component in quotes. For possible values type names(trellis.settings).
value desired value of the component.

Details

Lattice functions get their default graphical parameters from a global variable named trellis.settings. There are a couple of settings of this variable defined in the package, which can be set by calling trellis.device with appropriate arguments.

The functions trellis.par.* are meant to be interfaces to this variable. trellis.par.get returns the current value of a particular component and trellis.par.get sets its value.

trellis.par.get is usually used inside trellis functions to get graphical parameters before plotting. This enables device customization as well as modifications by users via trellis.par.set. Typical usage is:

add.line <- trellis.par.get("add.line")

add.line$col <- "red"

add.line <- trellis.par.set("add.line", add.line)

The actual list of the components in trellis.settings has not been finalized, so I'm not attempting to list them here. The current value can be obtained by print(trellis.settings). Most names should be self-explanatory.

show.settings provides a graphical display summarizing some of the values in the current setting.

There are a few more (non S compatible) interface functions which might be simpler to use. Details can be found in the documentation for lset.

Value

trellis.par.get returns a list giving parameters for that component .

Note

S-Plus keeps a different value of the settings attached to each device. Lattice does not work that way, and consequently sometimes the process does not work as it should — e.g., if an x11 device is already open with a specific (possibly modified from the default) setting, and a call to trellis.device(postscript) is made, the old setting will be overridden and will not be restored by dev.off().

Author(s)

Deepayan Sarkar deepayan@stat.wisc.edu

See Also

trellis.device, lset, Lattice

Examples

show.settings()

[Package Contents]