View source: R/plot.SC_output.R
| plot.SC_output | R Documentation |
S3 plot method for output from phase.sc().
The function supports old SC_phase tables
(TIME, dm, Phases) and newer tables with tree-level
information (Tree, TIME, dm, Phases).
## S3 method for class 'SC_output'
plot(
x,
DOY = NULL,
Year = NULL,
type = c("points", "ribbon", "both", "shrinkage", "expansion", "increment", "boxplot"),
cols = c("#fee8c8", "#fdbb84", "#e34a33"),
phNames = c("Shrinkage", "Expansion", "Increment"),
point_size = 3,
ribbon_alpha = 0.35,
show_tree = TRUE,
stat = "Magnitude",
temporal = "raw",
phase = "all",
...
)
x |
An object of class |
DOY |
Numeric vector with initial and final day of year for plotting,
e.g. |
Year |
Numeric value indicating the calendar year for plotting.
Required when |
type |
Character. Plot type, including boxplot for cycle distributions. One of |
cols |
Character vector of three colours, one for each phase. |
phNames |
Character vector with three phase names. |
point_size |
Numeric point size used for phase points. |
ribbon_alpha |
Numeric transparency for phase ribbons. |
show_tree |
Logical. If |
stat |
Numeric cycle column for boxplots; in ZG, an alias for metric. |
temporal |
Calendar grouping for boxplots: raw, daily, weekly, monthly or yearly. |
phase |
Phase names to include in boxplots, or all. |
... |
Unsupported arguments raise an error. |
For type = boxplot, each cycle/event contributes one observation. Calendar groups use event start dates, retain the year, and do not aggregate values before calculating quartiles. Non-finite measurements are excluded.
A ggplot object.
library(dendRoAnalyst)
data(gf_nepa17)
sc.phase <- phase.sc(df = gf_nepa17, TreeNum = 1, smoothing = 12)
plot(sc.phase, DOY = c(50, 60), Year = 2017)
plot(sc.phase, DOY = c(50, 60), Year = 2017, type = "ribbon")
plot(sc.phase, DOY = c(50, 60), Year = 2017, type = "increment")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.