Plot temperature coloured by depth
plot_temperature_at_depth.Rd
Plot temperature coloured by depth
Usage
plot_temperature_at_depth(
dat,
trend_threshold = 4,
superchill_threshold = -0.7,
heat_threshold = 18,
facet_var = NULL,
colour_palette = NULL,
legend_drop = FALSE,
legend_position = "right",
date_breaks_major = NULL,
date_breaks_minor = NULL,
date_labels_format = NULL,
ncol = 1,
nrow = NULL,
alpha = 1,
plotly_friendly = FALSE
)
Arguments
- dat
Data frame with at least three columns:
TIMESTAMP
(must be possible to convert to POSIXct),DEPTH
, andVALUE
. If columnVARIABLE
is included, it must have one unique entry. May also include columns with grouping variables passed to...
. Other columns will be ignored.- trend_threshold
The threshold for "trending up". Default is
trend_threshold = 4
. The last observation abovetrend_threshold
that does not return belowtrend_threshold
triggers the beginning of the growing season for eachDEPTH
and group in...
.- superchill_threshold
The threshold for "superchill". Default is
superchill_threshold = -0.7
. The first observation belowsuperchill_threshold
triggers the end of the growing season for each group inDEPTH
and...
.- heat_threshold
The threshold for heat stress. Default is
heat_threshold = 18
). Every observation aboveheat_threshold
triggers ann-hour
heat stress interval.- facet_var
Variable(s) defining faceting groups. Variables must be column(s) in
dat
). For a single facet variable:facet_var = "SEASON"
. For more than one facet variables:facet_var = "SEASON + DEPTH"
. Default isfacet_var = NULL
.- colour_palette
Optional vector of hex colors onto which
DEPTH
will be mapped. Ifcolour_palette = NULL
(the default), the reverse viridis colour palette will be used (option D).- legend_drop
Logical argument indicating whether to drop unused depths from the legend. Default is
legend_drop = FALSE
- legend_position
Position of the legend ("none", "left", "right", "bottom", "top"). Default is
legend_position = "right"
.- date_breaks_major
Character string specifying intervals for major breaks on the x-axis, e.g.,
date_breaks_major = "2 month"
. Default isdate_breaks_major = NULL
, which chooses breaks based on the length of the data series.- date_breaks_minor
Character string specifying intervals for major breaks on the x-axis, e.g.,
date_breaks_minor = "1 month"
. Default isdate_breaks_minor = NULL
, which chooses breaks based on the length of the data series.- date_labels_format
Character string specifying the format of the date labels on the x-axis, e.g.,
date_labels_format = "%y-%b"
. Default isdate_labels_format = NULL
, which chooses labels based on the length of the data series.- ncol
Number of columns for faceted figure. Default is
ncol = 1
.- nrow
Number of rows for faceted figure. Default is
nrow = NULL
.- alpha
Transparency for the heat stress and superchill shaded boxes.
- plotly_friendly
Logical argument. If TRUE, y-axis label is set to a plotly-friendly title ("Temperature (deg C)"). If FALSE,
expression()
is used to insert the degree symbol.