scale_arrow: Scale Arrows to Plot

View source: R/scale_arrow.R

scale_arrowR Documentation

Scale Arrows to Plot

Description

Scales envfit arrows to fit within 75

Usage

scale_arrow(arrows, data, at = c(0, 0), fill = 0.75)

Arguments

arrows

A two column data frame of coordinates from envfit result.

data

A two column data frame of coordinates for ordination plot.

at

coordinates of origin (0, 0)

fill

proportion of plot area to fill with maximum arrow length

Value

Silently returns a data frame of scaled coordinates for adding arrows to ordination plot.

Author(s)

Jari Oksanen with modifications by Gavin Simpson and John Quensen

Examples

data("varespec")
data("varechem")
vare_dist <- vegdist(varespec)
vare_mds <- monoMDS(vare_dist)
plt1 <- gg_envfit(ord=vare_mds, env=varechem, plot = FALSE)
mult <- scale_arrow(plt1$df_arrows, plt1$df_ord[ , c("x", "y")])
mult


ggordiplots documentation built on June 22, 2024, 12:05 p.m.