Learn R Programming

bipartite (version 0.90)

visweb: Plotfunction to visualize a bipartite foodweb

Description

this function draws a foodweb as a grid using a matrix. colnames and rownames are used as labels and entries in the matrix are visualized by text and colours. now it can be used to plot bipartite webs in a Vazquez et al. 2009 style

Usage

visweb(web, type="nested",  prednames=TRUE, preynames=TRUE, labsize=1,
  plotsize=12, square="interaction", text="no", frame=NULL, textsize=1,
  textcol="red", pred.lablength=NULL, prey.lablength, clear=TRUE,
  xlabel="", ylabel="", boxes=TRUE, circles=FALSE, circle.col="black",circle.min=0.2,
  circle.max=2, outerbox.border="white", outerbox.col="white" )

Arguments

web
A matrix representing the interactions observed between higher trophic level species (columns) and lower trophic level species (rows). Usually this will be number of pollinators on each species of plants or number of parasitoids on each species of prey.
type
type changes the sorting of rows and coloumns of the web and can be nested: (sorted by row/colSums) diagonal: (highest number of interactions appear along the diagonal, good for showing compartments) none: (as is)
prednames
labels can be switched of by prednames=F
preynames
labels can be switched of by preynames=F
labsize
factor for size of labels
plotsize
size of plot (length of width or height), depending on the dimension of the web in cm, default is 12 cm.
square
square is used to indicate number of interactions and belonging to compartments by coloured grid cells interaction: (level of grey indicates the number of intercation, white means no interaction) compartment: (level of grey indicates belong
text
number of interactions or belonging are plotted into each grid cell interaction: (number of interactions are drawn) compartment: (belonging to same compartment indicated by capitel Letters) none: (no text is shown)
frame
a frame is drawn around each compartment (frame=TRUE), best used with type=diagonal
textsize
factor for size of text in squares, default=1
textcol
color of text in grid cells, default =red
pred.lablength
length of predators (upper) labels that should be displayed
prey.lablength
length of prey (lower) labels that should be displayed
clear
delete species with no interactions (compulsory done for nested and diagonal)
xlabel
label on the x-axis, make sure prey.lablength is set accordingly, default is empty
ylabel
label on the y-axis, make sure pred.lablength is set accordingly, default is empty
boxes
logical, if boxes should be drawn. Default is set to TRUE
circles
logical, if circles in a Vazquez et al. style should be drawn. Default is set to FALSE, size and colours of circles and background can be set by the following arguments
circle.col
Colour of circles, works only if circles=TRUE
circle.min
minimal size of circles, use to rescale circles appropriately, default is 0.2
circle.max
maximal size of circle, , use to rescale circles appropriately, default is 2
outerbox.border
Colour of outerbox border if option circles=TRUE
outerbox.col
Colour of background if option circles=TRUE

Value

  • A plot window with appropriate size according to the dimensions of the web.

References

Vazquez, P.D., Chacoff, N.,P. and Cagnolo, L. (in press, 2009. Evaluating multiple determinants of the structure of plant-animal mutualistic networks. Ecology.

See Also

For a different plot on foodweb see plotweb

Examples

Run this code
data(Safariland)
visweb(Safariland)
visweb(Safariland, type="diagonal", square="compartment", text="none", frame=TRUE)
visweb(Safariland, type="nested", text="compartment")


visweb(Safariland, circles=TRUE,  boxes=FALSE,  labsize=1, circle.max=3, text="no")
visweb(Safariland, circles=TRUE,  boxes=FALSE,  labsize=1,  text="no",circle.max=1.8, outerbox.border="black")
visweb(Safariland, circles=TRUE,  boxes=TRUE, outerbox.col="orange", labsize=1, circle.max=1.8, text="no")

Run the code above in your browser using DataLab