Extract the modal values of the stacked density plot

modes_from_stacked_density(
  plot_object,
  spatial_scales = NULL,
  var_name = "variable",
  ...
)

Arguments

plot_object

a ggplot object

spatial_scales

numeric, the spatial scales corresponding to each raster in raster_list

var_name

character, used for the title of the graph

...

passed to ggplot2::scale_color_viridis_c()

Value

a list with three ggplot elements: a plot in the variable - density space, a plot in the variable mode - scale space, a density plot with the modes added.