stackplot: Function for plotting the result of a simulation over time

Description Usage Arguments Examples

Description

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.

Usage

1
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 with the names of the stages. Use legend=FALSE to supress the legend.

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

Examples

1
2
3
4
5
6
data(twospecies)
ab <- abundance.matrix(twospecies,seq(0,twospecies$maxtime,by=1))
# species 1
stackplot(ab[,1:3])
# species 2
stackplot(ab[,4:5])

Lobz/facilitation documentation built on May 7, 2019, 2:01 p.m.