Skip to contents

Plots the richness (or a single species) in the attribute (trait) space generated by lets.attrpam.

Usage

lets.plot.attrpam(x, species = NULL, col_rich = NULL, ...)

Arguments

x

A list returned by lets.attrpam.

species

Optional. A character string with the name of a species to highlight. If provided, plots its presence in trait space.

col_rich

Optional. A color palette function or vector. If `NULL`, a default palette is used (red ramp for species maps, red–white ramp for richness).

...

Additional arguments passed to plot().

Value

Invisibly returns NULL. Called for side effects (plots).

Details

Plot an Attribute-space PAM

Examples

if (FALSE) { # \dontrun{
# Example with simulated traits
n <- 2000
Species <- paste0("sp", 1:n)
trait_a <- rnorm(n)
trait_b <- trait_a * 0.2 + rnorm(n)  # correlated trait
df <- data.frame(Species, trait_a, trait_b)

# Build AttrPAM
x <- lets.attrpam(df, n_bins = 30)
lets.plot.attrpam(x)
} # }