autoplot.envfit: ggplot-based plot for 'envfit' objects

autoplot.envfitR Documentation

ggplot-based plot for envfit objects

Description

Produces a multi-layer ggplot object representing the output of objects produced by isomap.

Usage

## S3 method for class 'envfit'
autoplot(
  object,
  geom = c("label", "text", "label_repel", "text_repel"),
  line.col = "black",
  xlab = NULL,
  ylab = NULL,
  title = NULL,
  subtitle = NULL,
  caption = NULL,
  ...
)

Arguments

object

an object of class "envfit", the result of a call to envfit.

geom

character; which geom to use to label vectors and factor centroids.

line.col

colour with which to draw vectors.

xlab

character; label for the x-axis.

ylab

character; label for the y-axis.

title

character; subtitle for the plot.

subtitle

character; subtitle for the plot.

caption

character; caption for the plot.

...

additional arguments passed to fortify.

Value

A ggplot object.

Author(s)

Gavin L. Simpson

Examples

data(varespec, varechem)
ord1 <- metaMDS(varespec)
fit1 <- envfit(ord1, varechem, perm = 199)

autoplot(fit1, geom = 'label_repel')

data(dune, dune.env)
ord2 <- cca(dune)
fit2 <- envfit(ord2 ~ Moisture + A1, dune.env, perm = 199)

autoplot(fit2)

gavinsimpson/ggvegan documentation built on July 28, 2023, 9:24 a.m.