View source: R/metric_colors.R
metric_colors | R Documentation |
Returns a vector of colors based on the number of threshold breaks in the input 'FluvialGeomorphicMetric“ object.
metric_colors(metric)
metric |
MetricThreshold object; the fluvial geomorphic metric to be mapped |
a vector of colors
# Define metric objects
wdr3 <- new(Class = "FluvialGeomorphicMetric",
metric = "Width Depth Ratio",
definition = "bankfull width / bankfull depth",
variable = "xs_width_depth_ratio",
threshold_breaks = c(0, 10, 20, Inf),
threshold_labels = c("Incised",
"Stable",
"Overwidened"),
source = "Dunn & Leopold, 1978")
# Get a set of colors for a `FluvialGeomorphicMetric` object
cols <- metric_colors(wdr3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.