Learn R Programming

metacom (version 1.5.3)

Imagine: Plotting of site-by-species interaction matrices

Description

'Imagine' produces an image plot, grid of small rectangles representing species occurrences in sites, of a given interaction matrix.

Usage

Imagine(comm, col = c(0, 1), order = TRUE, scores = 1, fill = TRUE,
  xlab = "Species", ylab = "Site", yline = 2, xline = 2,
  sitenames = rownames(comm), speciesnames = colnames(comm),
  binary = TRUE)

Arguments

comm

community data in the form of a presence absence matrix

col

colors used to plot interactions. First value is the background color (no interaction) and the second color indicates an interaction.

order

logical. Should the interaction matrix be ordered based on reciprocal averaging scores before plotting?

scores

axis scores to ordinate matrix. 1: primary axis scores (default) 2: secondary axis scores

fill

logical. Should species ranges be made coherent before plotting?

xlab

name of the x axis

ylab

name of the y axis

yline

line that the y-axis label is plotted on.

xline

line that the x-axis label is plotted on.

sitenames

names for each row in the interaction matrix. Default is to not plot names.

speciesnames

names for each site in the interaction matrix. Default is to not plot names.

binary

logical argument indicating whether to ordinate the community matrix based on abundance or binary (default) data.

Value

Produces an image plot of the interaction matrix. The code is very simple, and may need to be modified if you have long site or species names, or wish to make it prettier than I have the ability to.

Examples

Run this code
# NOT RUN {
#define an interaction matrix
data(TestMatrices)
pres3c=TestMatrices[[6]]

#plot interaction matrix
Imagine(pres3c, col=c('white','blue'), order=TRUE, fill=FALSE)

# }

Run the code above in your browser using DataLab