phase_plot: Plot stem-cyclic phases

Description Usage Arguments Details Value Author(s) References Examples

View source: R/phase_plot.R

Description

The function creates a plot showing the three distinct phases of contraction, expansion and stem-radius increment (Deslauriers et al. 2011) for dendrometer series from a data.frame as produced by phase_def.

Usage

1
phase_plot(dm.gpf, dm.phase, sensor = NULL, period = NULL, colPhases = NULL, ...)

Arguments

dm.gpf

a data.frame with gap-filled dendrometer series as produced by fill_gaps.

dm.phase

a data.frame with numbers indicating the different stem-cyclic phases. Output of phase_def.

sensor

a numeric specifying the sensor to be plotted (by column number). Alternatively, sensor can be a character with column names. Concatenations and sequences are allowed for plotting phase definitions of multiple sensors at once. Defaults to all sensors in dm.gpf and dm.phase.

period

a numeric indicating the period to be plotted, specified using day of year values (begin and end). Defaults to the complete data period. Alternatively, period can be a character of two time stamps, indicating the begin and end date of the period to be plotted.

colPhases

a vector of length 3, specifying custom colors to be used for the three stem-cyclic phases. Defaults to the first three colors from the current palette.

...

additional graphical parameters (see par).

Details

The function plots phases of contraction, expansion and stem-radius increment along (one or more) dendrometer series. If more series are plotted (default), colors for the different lines can be defined using the col argument for graphical devices (see par). Note: if there are not enough custom colors, the function will repeat the last one used. If no colors are defined, the current palette will be used.

The time axis will be automatically labeled depending upon the length of the dendrometer series. If period is specified using a numeric, DOY values are displayed on the x-axis. In case a character of two time stamps is provided, axis labeling will be as follows: if series are longer than 120 days, years and months will be shown. If the length is between 30 and 120 days, months and days, and below 30 days, months, days and hours are displayed.

Value

Plot showing stem-cyclic phases on dendrometer series.

Author(s)

Marko Smiljanic

References

Deslauriers, A., Rossi, S., Turcotte, A., Morin, H. and Krause, C. (2011) A three-step procedure in SAS to analyze the time series from automatic dendrometers. Dendrochronologia 29: 151-161.

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
data(dmCD)
dm.phase <- phase_def(dmCD)
phase_plot(dmCD, dm.phase)

# zoom in on the dendrometer series
phase_plot(dmCD, dm.phase, period = c(133, 142))

# customization options
phase_plot(dmCD, dm.phase, period = c("2008-05-12", "2008-05-22"),
           colPhases = c("green", "cyan", "orange"),
           pch = 4, main = "Dendrometer", ylab = "Values")

## Not run: 

# specific sensors may be selected as follows:
data(dmED)
dm.gpf <- fill_gaps(dmED)
dm.phase <- phase_def(dm.gpf)
phase_plot(dm.gpf, dm.phase, sensor = 1)
phase_plot(dm.gpf, dm.phase, sensor = c(2,1))
phase_plot(dm.gpf, dm.phase, sensor = "Beech03")
phase_plot(dm.gpf, dm.phase, sensor = c("Beech03", "Beech04"))

## End(Not run)

dendrometeR documentation built on May 2, 2019, 6:34 a.m.