Learn R Programming

loa (version 0.3.1.1)

4.6.key.handlers: Key handling

Description

Workhorse functions for routine use of keys in plots.

Usage

keyHandler(key = NULL, ..., output = "key")

#keys

draw.loaPlotZKey(key = NULL, draw = FALSE, vp = NULL, ...)

draw.loaKey02(key = NULL, draw = FALSE, vp = NULL, ...)

draw.loaColorKey(key = NULL, draw = FALSE, vp = NULL, ...)

draw.loaColorRegionsKey(key = NULL, draw = FALSE, vp = NULL, ...)

draw.zcasePlotKey(key = NULL, draw = FALSE, vp = NULL, ...)

draw.ycasePlotKey(key = NULL, draw = FALSE, vp = NULL, ...)

draw.groupPlotKey(key = NULL, draw = FALSE, vp = NULL, ...)

draw.key.log10(key = NULL, draw = FALSE, vp = NULL, ...)

Value

keyHandler return a list of plot arguments to be used to generate a key .

When run within plot calls, the draw...key functions associated color keys. If they are used with loa plots and suitable

panel... functions, color scales are automatically aligned.

Arguments

key

The key to be used.

...

Any additional arguments to be used to modify the the key before plotting.

output

The format to return the function output in. This is 'key' for all routine (in plot) use.

draw, vp

lattice and grid arguments using when plotting GROB objects. Generally, these can be ignored.

Author

Karl Ropkins

Details

keyHandler is a general function that rotuine generates defaults arguments for add a key to a plot.

draw...key functions are all specialist plots keys. They are typically modifications of or variations on similar functions in lattice, e.g. draw.key and draw.colorkey.

draw.loaPlotZKey is the default 'bubble plot' key used with loaPlot.

draw.loaColorKey and draw.loaColorRegionsKey are variations on the draw.colorkey function in lattice.

draw.zcasePlotKey, draw.ycasePlotKey and draw.groupPlotKey are simple legends based on zcase, ycase and group annotation.

draw.key.log10 is a simple legend for use with log to the base 10 transformed z scale.

References

These functions make extensive use of code developed by others.

lattice: Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization with R. Springer, New York. ISBN 978-0-387-75968-5

See Also

In other packages: See xyplot in lattice.