Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

spag.plot

Spaghetti Plot


Description

Makes a spaghetti plot of tree-ring data.

Usage

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

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.

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.

Value

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

Author(s)

Andy Bunn. Patched and improved by Mikko Korpela.

See Also

Examples

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

dplR

Dendrochronology Program Library in R

v1.7.2
GPL (>= 2)
Authors
Andy Bunn [aut, cph, cre, trl], Mikko Korpela [aut, cph, trl], Franco Biondi [aut, cph], Filipe Campelo [aut, cph], Pierre Mérian [aut, cph], Fares Qeadan [aut, cph], Christian Zang [aut, cph], Allan Buras [ctb], Jacob Cecile [ctb], Manfred Mudelsee [ctb], Michael Schulz [ctb], Klesse Stefan [ctb], Frank David [ctb], Visser Ronald [ctb]
Initial release
2021-01-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.