autoplot.cca: ggplot-based plot for objects of class '"cca"'

autoplot.ccaR Documentation

ggplot-based plot for objects of class "cca"

Description

Produces a multi-layer ggplot object representing the output of objects produced by cca, or capscale.

Usage

## S3 method for class 'cca'
autoplot(
  object,
  axes = c(1, 2),
  geom = c("point", "text"),
  layers = c("species", "sites", "biplot", "centroids"),
  legend.position = "right",
  title = NULL,
  subtitle = NULL,
  caption = NULL,
  ylab,
  xlab,
  ...
)

Arguments

object

an object of class "cca", the result of a call to cca or capscale.

axes

numeric; which axes to plot, given as a vector of length 2.

geom

character; which geoms to use for the layers. Can be a vector of length equal to length(display), in which case the ith element of type refers to the ith element of display.

layers

character; which scores to plot as layers

legend.position

character or two-element numeric vector; where to position the legend. See theme for details. Use "none" to not draw the legend.

title

character; subtitle for the plot

subtitle

character; subtitle for the plot

caption

character; caption for the plot

ylab

character; label for the y-axis

xlab

character; label for the x-axis

...

Additional arguments passed to fortify.cca.

Details

TODO

Value

Returns a ggplot object.

Author(s)

Gavin L. Simpson

Examples

data(dune)
data(dune.env)

sol <- cca(dune ~ A1 + Management, data = dune.env)
autoplot(sol)

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