Map dominant climatic contributions
Source:R/contribution_map.R
plot_climniche_dominant_contribution.RdMap dominant climatic contributions
Usage
plot_climniche_dominant_contribution(
x,
type = c("variable", "share", "both"),
scope = c("current", "all"),
variable_labels = NULL,
colours = NULL,
title = NULL,
extent = NULL,
degree_labels = c("auto", "none", "hemisphere"),
study_region = NULL,
legend_position = "bottom",
legend_variables = NULL
)
# S3 method for class 'climniche_contribution'
plot(x, ...)Arguments
- x
A
climniche_contributionobject or fittedclimniche_fitobject.- type
Plot the dominant
"variable", its"share", or"both".- scope
Scope used when
xis a fitted object.- variable_labels
Optional named vector replacing climate variable names.
- colours
Optional colours for the climate variables. A final colour may be supplied for tied contributions; otherwise ties are grey.
- title
Optional overall title for a combined figure.
- extent
Optional
c(xmin, xmax, ymin, ymax)map extent.- degree_labels
Longitude-latitude label style.
- study_region
Optional study-region boundary accepted by
plot_climniche_map().- legend_position
Legend position.
- legend_variables
Optional character vector of fitted variable names to retain in the legend, including variables that are not dominant in any mapped cell. The default shows only observed categories.
- ...
Additional arguments passed to
plot_climniche_dominant_contribution()by the S3plot()method.
Examples
sim <- simulate_climniche(n = 300, p = 6, seed = 32)
fit <- fit_climniche(
sim[["current"]],
sim[["future_away"]],
occupied = sim[["occupied"]],
sensitivity = sim[["sensitivity"]]
)
contribution <- climniche_dominant_contribution(fit)