whittaker_base_plot | R Documentation |
Creates the Whittaker biome figure from the vignette example.
This can be modified by passing additional ggplot2
style
arguments to it.
whittaker_base_plot(color_palette = NULL)
color_palette |
A named or unnamed vector of length 9 that contains either
color names or values. If named, the names should correspond to biome names in the
|
To specify your own color palette, create a named vector where the names correspond to biome type and the values correspond to the colors you'd like to use. This can either be numeric (e.g. 1,2,3, etc) or character (e.g. 'red' or '#C1E1DD'). The names for each biome are as follows:
Tundra
Boreal forest
Temperate seasonal forest
Temperate rain forest
Tropical rain forest
Tropical seasonal forest/savanna
Subtropical desert
Temperate grassland/desert
Temperate grassland/desert
Woodland/shrubland
If the vector is unnamed, the names from Ricklefs (2008) will be inserted automatically.
Add additional features (e.g. theme()
elements) using normal
ggplot2
syntax. See examples.
An object of class gg
and ggplot
.
Sam Levin, Valentin Stefan
library(ggplot2)
# Create the base plot
whittaker_base_plot()
# move the legend to top left corner, add border box,
# and adjust the background fill and grid.
whittaker_base_plot() +
theme(legend.position = c(0.15, 0.75),
panel.background = element_blank(),
panel.grid.major = element_line(gray(0.7)),
panel.border = element_rect(fill = NA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.