Learn R Programming

loa (version 0.3.1.1)

1.4.stackPlot: Stack plots

Description

Stack plot functions for Lattice.

Usage

stackPlot(x, data = NULL, ...)

#standard panels

panel.stackPlot(..., process=TRUE, plot=TRUE, loa.settings = FALSE)

#data handlers ##currently not exported

Value

stackPlot returns trellis objects, much like conventional lattice plot functions.

panel.stackPlot is intended for use within a trianglePlot function call.

Arguments

x

For stackPlot only, a formula of general structure y1 + y2 ~ x | cond, etc. The elements y1, y2, etc are stacked on the y-axis, and plotted against x. Both are required.

data

For stackPlot only, if supplied, the assumed source of the elements of formula x, typically a data.frame.

...

Additional arguments.

loa.settings, plot, process

loaPlot arguments used to manage panelPal activity.

Author

Karl Ropkins

Details

stackPlot generates a stack plot using the lattice framework.

panel.stackPlot handles the appearance of triangle plot outputs.

References

These function makes extensive use of code developed by others.

As elsewhere, the use of lattice is also gratefully acknowledged:

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

See Also

In loa: loaPlot and panelPal.

In other packages: xyplot and panel.polygon in lattice.

Examples

Run this code

## Example 1
## Basic stack plot usage

if (FALSE) {
  stackPlot(lead~dist.m, data=lat.lon.meuse)
  stackPlot(cadmium+copper+lead+zinc~dist.m, data=lat.lon.meuse)}

  stackPlot(cadmium*40+copper*5+lead+zinc~dist.m, data=lat.lon.meuse)
 

Run the code above in your browser using DataLab