
Plot heatmap of degradation scaling parameters
Source:R/reef-parameter_plots.R
plotDegradationScale.RdCreates a heatmap showing the scaling of refuge density across bleaching
years and refuge size bins for a given degradation trajectory. The input
data should have refuge size bins as rows and bleaching years as columns
(column 1 = bleaching year, remaining columns = years 1, 2, 3... post-
bleaching), matching the format of the built-in trajectory objects
(e.g. rubble_scale) and of deg_scale as used by
reefDegrade().
Arguments
- object
An optional object of class MizerParams or MizerSim. If provided, the function will attempt to extract the degradation scaling or trajectory from its
@other_params$refuge_paramsslot.- trajectory
Optional. Either a character string (
"rubble","algae","recovery") to use built-in data, or a user-provided numeric matrix/data.frame with refuge size bins as rows and bleaching years as columns (column 1 = bleaching year, remaining columns = years 1, 2, 3... post-bleaching).- return_data
Logical. If TRUE, returns the formatted data frame instead of the plot. Default FALSE.
Details
This function is flexible in its input:
If
trajectoryis provided, it takes precedence. It can be:A character string (
"rubble","algae","recovery") to use built-in data.A user-provided numeric matrix or data.frame with refuge size bins as rows and bleaching years as columns (column 1 = bleaching year, remaining columns = years 1, 2, 3... post-bleaching).
If
trajectoryis not provided,objectmust be supplied and can be a MizerParams or MizerSim object. The function will extract the degradation scaling or trajectory fromobject@other_params$refuge_params$trajectoryorobject@other_params$refuge_params$deg_scale.
See also
plotting_functions, setDegradation(), reefDegrade()
Other plotting functions:
plot2Productivity(),
plot2TotalBiomass(),
plotDegScale(),
plotProductivity(),
plotProductivityRelative(),
plotRefugeDensity(),
plotRefugeProfile(),
plotRelativeContribution(),
plotSpectraChange(),
plotTotalAbundance(),
plotTotalBiomass(),
plotTotalBiomassRelative(),
plotVulnerable()