Description Usage Arguments Author(s) Examples
Plot succession or elevation gradient based on Landclim decadal output.
1 | plot_gradient(x, y, col = NULL, ...)
|
x |
x values, either elevation or decades from e.g. elevation output. |
y |
y values as matrix. Species columns from e.g. elevation output. |
col |
Color vector of length ncol(y). Use e.g. landclim_colors(). |
... |
Additional arguments for function plot(). |
Klara Dolos
1 2 3 4 5 6 7 8 9 | dat <- read.table(system.file("elevation_biomass_out.csv", package = "LandClimTools"), sep = ",", dec = ".", header = TRUE)
species <- c("abiealba" , "piceabie", "fagusilv", "pinusilv", "querpetr")
plot_gradient(dat$decade[dat$elevation==823], dat[dat$elevation==823, c(species)], col=landclim_colors(length(species)), xlab="Decade", ylab="Biomass", ylim=c(0,400))
legend("topleft", legend = species, col = landclim_colors(length(species)), pch=15, pt.cex=2)
plot_gradient(dat$elevation[dat$decade==50], dat[dat$decade==50, c(species)], xlab="Elevation", ylab="Biomass", col=landclim_colors(length(species)), ylim=c(0,400))
legend("topleft", legend = species, col = landclim_colors(length(species)), pch=15, pt.cex=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.