ggord_plot | R Documentation |
Alternative to plot vegan's CCA and RDA objects using ggplot2. Produces illustrative and good looking graphics with less code and need for customization. Plots envfit
and ordisurf
when needed.
ggord_plot(
mod,
env_data = NULL,
axes = 1:2,
size_preset = "device",
arrow.mul = NULL,
ordisurf_var = NULL,
centroids = TRUE,
envfits = NULL,
sp_repel_method = "orditorp",
sp_label_omit = 0.1,
capitalize_cn = TRUE,
site_col = "grey70",
sp_col = "firebrick3",
sp_cross_col = "red",
sp_arrow = FALSE,
cn_col = "darkolivegreen",
ordi_col = "lightskyblue1",
envfits_col = c("#82C893", "#D696C8", "#056A89", "#B5794C", "#FF9252"),
base_size = NULL,
site_size = NULL,
sp_size = NULL,
cn_size = NULL,
ordi_size = NULL,
envfits_size = NULL,
main = NULL
)
mod |
|
env_data |
optional data frame containing environmental data, which should be fitted using the |
axes |
numeric vector defining two ordination axes for the plot. |
size_preset |
character specifying the size preset for the graphic device. Options: "device" or "pdf". Size of symbols in the plot will be automatically scaled to the device or 122 mm wide pdf (page width for many scientific journals), respectively. You can override the scaling using the |
arrow.mul |
factor to expand arrows in the graph. Analogous to the |
ordisurf_var |
character specifying the column name in |
centroids |
logical indicating whether CCA or RDA centroids should be plotted ( |
envfits |
character vector specifying the names of |
sp_repel_method |
character specifying desired the method to avoid cluttering of species names. Options: "orditorp", "label_omit", "ggrepel" or |
sp_label_omit |
numeric value giving the boundary for omiting species names. Any species labels less than this argument on either axis will be replaced by |
capitalize_cn |
logical indicating whether centroid names should be capitalized. |
site_col |
character specifying the color for sites ( |
sp_col |
character specifying the color for species ( |
sp_cross_col |
character specifying the color for omited species label symbols ( |
sp_arrow |
logical indicating whether biplot arrows should be plotted for species. |
cn_col |
character specifying the color for centroids ( |
ordi_col |
character specifying the color for |
envfits_col |
character vector specifying the colors for |
base_size |
base font size for ggplot2 (see |
site_size |
size parameter for site symbols |
sp_size |
font size for species labels |
cn_size |
font size for centroid labels |
ordi_size |
cex parameter for |
envfits_size |
cex parameter for |
main |
character giving the title for the plot. See |
All font sizes should be specified using actual font sizes (not ggplot font sizes).
Mikko Vihtakari with code from Jari Oksanen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.