Learn R Programming

lattice (version 0.4-0)

trellis.par.get: 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.

Value

  • trellis.par.get returns a list giving parameters for that 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.

See Also

trellis.device, lset, Lattice

Examples

Run this code
show.settings()

Run the code above in your browser using DataLab