Initialization of a display device with appropriate graphical parameters.
1 2 3 4 5 6 7 8 9 10
function (or the name of one as a character string)
that starts a device. Admissible values depend on the platform and
how R was compiled (see
logical, whether the initial settings should be color or
black and white. Defaults to
list of components that changes the settings of the device opened, or, a function that when called produces such a list. The function name can be supplied as a quoted string. These settings are only used to modify the default settings (determined by other arguments), and need not contain all possible parameters.
A possible use of this argument is to change the default settings by
logical flag indicating whether a new device should be
name of the device for which the setting is required, as
additional parameters to be passed to the
Trellis Graphics functions obtain the default values of various
graphical parameters (colors, line types, fonts, etc.) from a
customizable “settings” list. This functionality is analogous
par for standard R graphics and, together with
lattice.options, mostly supplants it (
settings are mostly ignored by Lattice). Unlike
Trellis settings can be controlled separately for each different
device type (but not concurrently for different instances of the same
predefined settings (a.k.a. themes), while
provides a high level interface to control which “theme” will
be in effect when a new device is opened.
called automatically when a
"trellis" object is plotted, and
the defaults can be used to provide sufficient control, so in a
properly configured system it is rarely necessary for the user to call
standard.theme function is intended to provide device
specific settings (e.g. light colors on a grey background for screen
devices, dark colors or black and white for print devices) which were
used as defaults prior to R 2.3.0. However, these defaults are not
always appropriate, due to the variety of platforms and hardware
settings on which R is used, as well as the fact that a plot created
on a particular device may be subsequently used in many different
ways. For this reason, a “safe” default is used for all
devices from R 2.3.0 onwards. The old behaviour can be reinstated by
standard.theme as the default
e.g. by putting
"standard.theme") in a startup script (see the entry for
above for details).
standard.theme returns a list of components defining graphical
parameter settings for Lattice displays. It is used internally in
trellis.device, and can also be used as the
trellis.par.set, or even as
trellis.device to use the defaults for another device.
canonical.theme is an alias for
col.whitebg returns a similar (but smaller) list that is
suitable as the
theme argument to
trellis.par.set. It contains settings values which
provide colors suitable for plotting on a white background. Note that
col.whitebg is somewhat of a misnomer, since it
actually sets the background to transparent rather than white.
Earlier versions of
trellis.device had a
bg argument to
set the background color, but this is no longer supported. If
bg argument will be passed on to the device
function; however, this will have no effect on the Trellis settings.
It is rarely meaningful to change the background alone; if you feel
the need to change the background, consider using the
Deepayan Sarkar [email protected]
Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization with R, Springer. http://lmdvr.r-forge.r-project.org/
trellis.par.set can be
used to query and modify the settings after a device has been
par.settings argument to high level
functions, described in
xyplot, can be used to attach
transient settings to a
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.