Learn R Programming

ggvegan (version 0.1-0)

autoplot.envfit: 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 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.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab