Skip to contents

Function adds a text layer to an ordiggplot() graph using ggplot2::geom_text().

Usage

geom_ordi_text(score, data, ...)

Arguments

score

Ordination score to be added to the plot.

data

Alternative data to the function that will be used instead of score. This can be a vegan::envfit() result object which is used to plot centroids of factor levels.

...

other arguments passed to ggplot2::geom_text()

Value

Returns a ggplot2 layer geom_text.

Author

Jari Oksanen

Examples

library(vegan)
library(ggplot2)
data(dune, package = "vegan")
mod <- metaMDS(dune, trace = 0)
ordiggplot(mod) +
  geom_ordi_text("sites", size=3) +
  geom_ordi_text("species", mapping=aes(fontface="italic"))