crn.plot: Plot a Tree-Ring Chronology

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function makes a default plot of a tree-ring chronology from a data.frame of the type produced by chron.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
crn.plot(crn, add.spline = FALSE, nyrs = NULL, f = 0.5, 
         crn.line.col='grey50',spline.line.col='red',
         samp.depth.col='grey90',
         samp.depth.border.col='grey80',
         crn.lwd=1,spline.lwd=1.5,
         abline.pos=1,abline.col='black',
         abline.lty=1,abline.lwd=1,
         xlab="Time",ylab="RWI",...)

## S3 method for class 'crn'
plot(x, ...)

Arguments

x, crn

a data.frame e.g., as produced by chron. The data.frame should have the years in rownames(crn), the chronologies in the columns. Optionally, the last column can contain the sample depth named "samp.depth". If the data are produced via chron the object will be of class "crn" and the generic plot method can be used

add.spline

a logical flag. Will add a line with a smoothing spline using ffcsaps

nyrs

a number giving the rigidity of the smoothing spline. Defaults to 0.33 times the length of the first chronology if nyrs is NULL

f

a number between 0 and 1 giving the frequency response or wavelength cutoff. Defaults to 0.5

crn.line.col

color for the x line

spline.line.col

color for the spline (if added)

samp.depth.col

color for the sample depth polygon (if present)

samp.depth.border.col

border color for the sample depth polygon (if present)

crn.lwd

line width for the x line

spline.lwd

line width for the spline (if added)

abline.pos

position for a reference abline on the y-axis. No line added if NULL

abline.col

color for the reference abline (if added)

abline.lty

line type the reference abline (if added)

abline.lwd

line width for the reference abline (if added)

xlab

default label for x axis

ylab

default label for y axis

...

Additional arguments to pass to plot. The scale of the secondary y axis (sample depth) can be controlled with argument ylim2.

Details

This makes a plot of one or more tree-ring chronologies.

Value

None. Invoked for side effect (plot).

Author(s)

Andy Bunn. Patched and improved by Mikko Korpela.

See Also

chron

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
library(graphics)
library(utils)
data(cana157)
crn.plot(cana157)
plot(cana157, main='Twisted Tree Heartrot Hill')
# with added spline
crn.plot(cana157,add.spline=TRUE, nyrs=32)
## Without sample depth
cana157.mod <- cana157
cana157.mod$samp.depth <- NULL
crn.plot(cana157.mod, add.spline = TRUE)
## A raw ring-width chronology with prewhitening
data(ca533)
ca533.raw.crn <- chron(ca533, prefix = "CAM", prewhiten=TRUE)
plot(ca533.raw.crn,ylab='mm',
     abline.pos=mean(ca533.raw.crn[,1],na.rm = TRUE))  

## Not run: 
  # not pretty - but illustrates the coloring options
  my.cols <- c("#3182BD","#9ECAE1","#DEEBF7","#31A354","#A1D99B","#E5F5E0")
  crn.plot(cana157,add.spline=TRUE,nyrs=32,
             crn.line.col=my.cols[5],
             spline.line.col=my.cols[4],
             samp.depth.col=my.cols[3],
             samp.depth.border.col=my.cols[2],
             abline.col=my.cols[1],
             crn.lwd=1.5,spline.lwd=3,
             abline.lwd=1,
             xlab="Year", ylab="RWI")

## End(Not run)

dplR documentation built on May 2, 2019, 6:06 p.m.