Skip to contents

The loading of each model on the consensus axis (the first principal component of the standardised predictions), with the models whose median forms the ensemble marked, and the share of variance of the axis.

Usage

plot_ensemble_pca(x, base_size = 11, file = NULL, width = 1800, height = 1200)

Arguments

x

An enm_ensemble object made with method = "pcam".

base_size

Base font size.

file

Optional file(s) to save the plot to, e.g. "fig.pdf" or c("fig.png", "fig.pdf"); the format follows the extension, and a name without extension is saved as PNG and PDF.

width, height

Size of the saved figure in pixels (PDF and SVG at 300 pixels per inch).

Value

A ggplot object.

References

Thuiller, W. (2004) Patterns and uncertainties of species' range shifts under climate change. Global Change Biology 10, 2020-2027. doi:10.1111/j.1365-2486.2004.00859.x

Examples

sim <- simulate_enm_data(seed = 1)
ens <- ensemble_models(sim$models)
plot_ensemble_pca(ens)