Learn R Programming

loa (version 0.3.1.1)

5.2.plot.add.functions: General plot add... functions

Description

General functions for adding extra layers to existing plots.

Usage

add.XYZGhosts(object = NULL, 
              ..., unit = "native", 
              ghost.panel = panel.loaPlot) 

add.Y2Axis(object = NULL, ..., unit = "native", rescale = NULL)

add.XYPolygon(object = NULL, x = NULL, y = NULL, data = NULL, ..., unit = "native", y2.scale=FALSE, first=FALSE)

add.LonLatMap(object = NULL, ..., map = NULL, recolor.map=FALSE, show.axes = FALSE, unit = "native", first = TRUE)

Value

add... functions returns the supplied (or last) lattice plot with an additional plot layer added.

Arguments

object

The plot to add an extra plot layer or layers to. This defaults to last lattice plot produced if not set in call.

...

Additional arguments, passed on to related functions.

unit

The plot units, by default native.

ghost.panel

The plot panel to use when adding ghost points (lines, etc).

rescale

For add.Y2Axis, y data-series rescaling, by default NULL/none.

x,y

x and y data-series to be used.

data

If supplied, the expected source of x and y data-series.

y2.scale

When building the Plot, use the second y axis if that exists, default FALSE.

first

When building the plot add the new plot layer first, default varies.

map,recolor.map,show.axes

Options when adding a map layer, see loaMapPlot documentations.

Author

Karl Ropkins

Details

add.loaGhosts adds ghost points showing the locations of all points in all panels.

add.Y2Axis adds a second y axis.

add.XYPolygon adds a supplied (x,y) polygon.

add.LonLatMap adds a map layer.

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

Grid (part of base R): R Core Team (2017). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.