plotGrad: Plots Species gainst an Environmental Gradient

plotGradR Documentation

Plots Species gainst an Environmental Gradient

Description

Plots each species in a data frame against an environmental gradient using trellis graphics.

Usage

plotGrad(x, grad, freq.limit = 0, ...)

Arguments

x

Data frame with species data.

grad

Gradient vector.

freq.limit

Lowest frequency for species selected for plotting

...

Other parameters to Lattice functions.

Details

Function plotGrad is intended for preliminary inspection of the data. It plots each species in a data frame against an environmental gradient using Lattice functions. If grad is numeric, it uses scatter plots (xyplot) and if grad is a factor, it uses boxplots (bwplot).

All species are plotted with equal vertical scale, making scarce species very flat. Users can change this behaviour by transforming or standardizing species data before analysis (for instance, decostand) has options "max" for making all species to equal scale).

The function uses trellis graphics in package lattice, and transfers all parameters to underlying functions xyplot and bwplot. Moreover, many graphical parameters can be changed after producing the graph (see trellis.par.set).

Value

Function returns a "trellis" object.

Author(s)

Jari Oksanen

See Also

See Lattice basics of Trellis graphics, xyplot and bwplot for underlying plotting functions, and trellis.par.set for setting graphical parameters.

Examples

data(mtf01, mtf.alt)
attach(mtf.alt)
fig  <- plotGrad(mtf01, Altitude)
fig
library(lattice)
trellis.par.set(theme = col.whitebg())
fig

jarioksa/gravy documentation built on May 24, 2024, 4:52 a.m.