Learn R Programming

dplR (version 1.8.0)

spag.plot: Spaghetti Plot

Description

Makes a spaghetti plot of tree-ring data.

Usage

spag.plot(rwl, zfac = 1, useRaster = FALSE, res = 150, ...)

Value

None. This function is invoked for its side effect, which is to produce a plot.

Arguments

rwl

a data.frame with series as columns and years as rows such as that produced by read.rwl.

zfac

a multiplier for rwl to enhance clarity when plotting.

useRaster

A logical flag. If TRUE, the tree-ring series are drawn as a raster image. Other parts of the plot are not affected. Other choices are NA (automatic) and FALSE (use vector graphics, the default). See wavelet.plot.

res

A numeric vector of length 1. The resolution (pixels per inch) of the tree-ring series when a raster image is used.

...

arguments to be passed to lines.

Author

Andy Bunn. Patched and improved by Mikko Korpela.

Details

This makes a simple plot of each series in a tree-ring data set. Each series is centered first by subtracting the column mean using scale. The plot can be grossly tuned with zfac which is a multiplier to rwl before plotting and centering.

Ring-width indices (class "rwi", see as.rwi) are centred on 1, or on 0 if they are differences, and not on their means, so the grey line under each series is the value the indices should sit at.

See Also

seg.plot

Examples

Run this code
library(utils)
data(co021)
plot(co021,plot.type = "spag")
spag.plot(co021, zfac = 2)

Run the code above in your browser using DataLab