Query and set session-wide graphical parameter defaults.

Share:

Description

flowViz.par.get is the equivalent to trellis.par.get. It queries the session wide defaults for all lattice and flowViz graphical parameters.

Usage

1
2
3
4
flowViz.par.get(name = NULL)

flowViz.par.set(name, value, ..., theme, warn = TRUE, strict = FALSE,
  reset = FALSE)

Arguments

name

The name of a parameter category to set.

value

A named list of values to set for category name or a list of such lists if name is missing.

theme

The theme to set. See trellis.par.set for details.

warn

This gets passed on directly to trellis.par.set.

strict

This gets passed on directly to trellis.par.set.

reset

logical scalar. When TRUE, drop the entire list of old graphical parameters and reset it with the supplied one. Default is FALSE, which updates the existing parameters.

...

Further arguments that get passed on.

Details

flowViz.par.set is the equivalent to trellis.par.set. It sets the same set of graphical parameters, either in the flowViz package or directly in lattice.

Getting and setting graphical parameters in flowViz follows exactly the mechanism of the lattice package. For all purpose and intentions, flowViz.par.get and flowViz.par.get can be viewed as wrappers around their lattice counterparts trellis.par.get and trellis.par.set and you should consult their documentation for further details.

We introduce four new categories of graphical parameters that are relevant for flowViz plots:

gate

Controls the appearance of gate boundaries in xyplots (if smooth=TRUE) or of the points within a gate region (smooth=FALSE). Available parameters are col, cex,pch,alpha,lwd,lty and fill.

gate.density

Controls the appearance of gate boundaries in densityplots. Available parameters are col, alpha,lwd,lty and fill.

flow.symbol

Controls the appearance of 'regular' points in a flowViz plot. Available parameters are col, cex,pch,alpha and fill.

gate.text

Controls the appearance of the text used for gate names. Available parameters are col, cex,font,alpha and lineheight.

Value

flowViz.par.get returns a list of graphical parameter defaults, if name is not empty, only for this particular category. For an empty name argument, the function returns all parameter defaults, including the ones specified in the lattice package.

flowViz.par.set is called for its side-effects of setting default parameters.

Note

Because parameter settings in lattice are device-dependent, flowViz.par.get will open a (default) device none is open at the time of the query.

Author(s)

F. Hahne

References

Deepayan Sarker, Lattice, Multivariate Data Visualization with R, Springer, New York, 2008

See Also

trellis.par.get and trellis.par.set

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Return all available parameters, including lattice ones
flowViz.par.get()

## Set the font for gate names
flowViz.par.set("gate.text", list(font=2))

## Query only the gate.text category
flowViz.par.get("gate.text")

## Set a lattice parameter
plot.symbol <- trellis.par.get("plot.symbol")
flowViz.par.set("plot.symbol", list(col="red"))
trellis.par.get("plot.symbol")

## undo all settings
flowViz.par.set(list(plot.symbol=plot.symbol, gate.text=list(font=1)))

data(GvHD)
fs <- GvHD[1:2]

# using default ggplot2like theme
densityplot(~`FSC-H`, fs)
xyplot(`SSC-H`~`FSC-H`, fs, smooth = FALSE)

# reset it with default lattice theme
flowViz.par.set(theme =  trellis.par.get(), reset = TRUE)
densityplot(~`FSC-H`, fs)
xyplot(`SSC-H`~`FSC-H`, fs, smooth = FALSE)