ord_plot | R Documentation |
Alternative to plot vegan's CCA and RDA objects producing illustrative and good looking graphics with less code and need for customization. Plots envfit
and ordisurf
when needed.
ord_plot(
mod,
env_data = NULL,
scaling = "species",
size_preset = "device",
ordisurf_var = NULL,
centroids = TRUE,
envfits = NULL,
orditorp = TRUE,
orditorp_air = 1,
st_col = "grey70",
st_symbol = "+",
ordihull_st = FALSE,
species = TRUE,
sp_col = "black",
sp_arrow = FALSE,
sp_symbol = 20,
sp_symbol_col = "black",
sp_font = 3,
latin_sp_names = FALSE,
cn_col = "darkolivegreen",
ordi_col = c("lightskyblue1", "lightsalmon1"),
envfits_col = c("#649971", "#A47399", "#03617E", "#B5794C", "#FF9252", "#FF5F68",
"#449BCF"),
main_cex = NULL,
st_cex = NULL,
sp_cex = NULL,
sp_symbol_cex = NULL,
cn_cex = NULL,
ordi_cex = NULL,
envfits_cex = NULL,
main = NULL,
axis_labs = TRUE,
legend_pos = "topleft",
title.main = NULL,
title.sub = NULL,
...
)
mod |
|
env_data |
optional data frame containing environmental data, which should be fitted using the |
scaling |
Scaling for species and site scores. See the |
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 |
ordisurf_var |
character specifying the column name in |
centroids |
logical indicating whether CCA or RDA centroids should be plotted ( |
envfits |
character vector specifying column names in |
orditorp |
logical indicating whether |
orditorp_air |
numeric defining the air argument for |
st_col |
character specifying the color for sites ( |
st_symbol, sp_symbol |
|
ordihull_st |
logical indicating whether |
species |
logical indicating whether to show the species labels. |
sp_col |
character specifying the color for species ( |
sp_arrow |
logical indicating whether biplot arrows should be plotted for species. |
sp_symbol_col |
character specifying the color for species symbols. |
sp_font |
An integer which specifies which font to use for text. If possible, device drivers arrange so that 1 corresponds to plain text (the default), 2 to bold face, 3 to italic and 4 to bold italic. Also, font 5 is expected to be the symbol font, in Adobe symbol encoding. On some devices font families can be selected by family to choose different sets of 5 fonts. From |
latin_sp_names |
logical indicating whether species abbreviations should be converted to latin names. This functionality is probably not working. Check. |
cn_col |
character specifying the color for centroids ( |
ordi_col |
character specifying the color for |
envfits_col |
character vector specifying the colors for |
main_cex |
cex parameter for axes titles ( |
st_cex |
cex parameter for site symbols. |
sp_cex, sp_symbol_cex |
cex parameter for species names and symbols, respectively. |
cn_cex |
cex parameter for centroids. |
ordi_cex |
cex parameter for |
envfits_cex |
cex parameter for |
main |
character specifying title for the plot. Overlaps with title.main. Fix. |
axis_labs |
logical indicating whether to plot axis labels. |
legend_pos |
character specifying the location of legend (only added if colors are mapped to variables). Set to |
title.main |
Overlaps with main. Fix. |
title.sub |
character specifying sub-title for the plot. |
... |
parameters passed to |
While the function produces OK looking plots at the moment (and they seem to be correct too), the function needs to be rewritten to comply with vegan's "dialect". Also some features are redundant. I will do this rewriting at some point in the future when I have time. Also add examples.
Mikko Vihtakari with code from Jari Oksanen and Gavin Simpson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.