Learn R Programming

facilitation (version 0.5.2)

stackplot: Plots

Description

Plotting functions.

Usage

stackplot(mat, col, legend, log.y = FALSE, perc = F, qt = 100, ...)

Arguments

mat

A population matrix, as produced by abundance.matrix or something that can be coerced to matrix

col

Optional. A color vector

legend

Optional. An array of names

log.y

Logical. Should the y-axis be plotted in a logarithmic scale?

perc

Logical. If set to true, will output the y-axis as a percentage instead of the absolute numbers

qt

Optional. For distributions, show only up to quantile qt (percentage)

Further parameters to be passed to the lower level plot function

Details

The stackplot function produces a stacked plot of the population over time. Notice that the population should have at least two stages for this function to work.

Examples

Run this code
# NOT RUN {
data(twospecies)
ab <- abundance.matrix(twospecies,seq(0,twospecies$maxtime,by=1))
# species 1
stackplot(ab[,1:3])
# species 2
stackplot(ab[,4:5])
# }

Run the code above in your browser using DataLab