gg_ordiplot | R Documentation |
gg_ordiplot
uses ggplot2
to make an ordination plot
with group ellipses by default, and optionally hulls and/or
spiders. It is patterned after vegan
's functions ordiellipse
,
ordihull
, and ordispider
and accepts similar parameters.
gg_ordiplot(
ord,
groups,
scaling = 1,
choices = c(1, 2),
kind = c("sd", "se", "ehull"),
conf = NULL,
show.groups = "all",
ellipse = TRUE,
label = FALSE,
hull = FALSE,
spiders = FALSE,
pt.size = 3,
plot = TRUE
)
ord |
An ordination object. |
groups |
A vector of groups. |
scaling |
Scaling for ordination plot. |
choices |
Axes to be plotted. |
kind |
Type of ellipses to show ("se", sd", "ehull"). |
conf |
Confidence value for ellipses if "se" or "sd." |
show.groups |
Subset of groups to plot. |
ellipse |
A logical for plotting ellipses; defaults to TRUE. |
label |
A logical for labeling group centroids. |
hull |
A logical for plotting group hulls. |
spiders |
A logical for plotting group spiders. |
pt.size |
Symbol size. |
plot |
A logical for plotting; defaults to TRUE. |
Silently returns the plot and data frames used for the plotting.
data("dune")
data("dune.env")
dune.hel <- decostand(dune, method = "hellinger")
ord <- rda(dune.hel)
gg_ordiplot(ord, groups = dune.env$Management)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.