Plot filtered data with removed data greyed out
plot_filtered_data.Rd
Plot filtered data with removed data greyed out
Usage
plot_filtered_data(
dat,
dat_filtered,
trend_threshold = 4,
superchill_threshold = -0.7,
heat_threshold = 18,
colour_palette = NULL,
legend_drop = FALSE,
legend_position = "right",
ylims = NULL,
date_axis_name = "Date",
date_breaks_major = NULL,
date_breaks_minor = NULL,
date_labels_format = NULL,
plotly_friendly = FALSE,
alpha = 1
)
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.- dat_filtered
Filtered data, i.e. the result of
apply_dd_filters(dat)
.- 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.- 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"
.- ylims
Numeric vector of limits for the y-axis.
- date_axis_name
Name for the x-axis.
- 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.- 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.- alpha
Transparency for the heat stress and superchill shaded boxes.