plotweb {diagram}R Documentation

plots a web

Description

plots a web, based on a flow matrix

Usage

plotweb(flowmat, names = NULL, lab.size = 1.5, add = FALSE, 
        fig.size = 1.3, main = "", sub = "", sub2 = "", 
        log = FALSE, mar = c(2, 2, 2, 2), 
        nullflow = NULL, minflow = NULL, maxflow = NULL,
        legend = TRUE, leg.digit = 5, leg.title = NULL, 
        lcol = "black", arr.col = "black",
        val = FALSE, val.digit = 5, val.size = 0.6, val.col = "red",
        val.title = NULL, val.ncol = 1, 
        budget = FALSE, bud.digit = 5, bud.size = 0.6,  
        bud.title = "budget", bud.ncol = 1, 
        maxarrow = 10, minarrow = 1, length = 0.1, dcirc = 1.2, bty = "o", ...)

Arguments

flowmat

flow matrix, rows=flow *from*, columns=flow *to*.

names

string vector with the names of components.

lab.size

relative size of name label text.

add

start a new plot (FALSE), or add to current (TRUE).

fig.size

if add = FALSE: relative size of figure.

main

if add = FALSE: main title.

sub

if add = FALSE: sub title.

sub2

ifadd = FALSE: title in bottom.

log

logical indicating whether to scale the flow values logarithmically.

mar

the figure margins.

nullflow

either one value or a two-valued vector; if flow < nullflow[1] or flow > nullflow[2] (if two values): flow is assumed = 0 and the arrow is not drawn.

minflow

flowvalue corresponding to minimum arrow thickness.

maxflow

flowvalue corresponding to maximum arrow thickness.

legend

logical indicating whether to add a legend with arrow thickness.

leg.digit

nr of digits for writing legend - only if legend = TRUE.

leg.title

title for arrow legend, e.g to give units - only if legend =TRUE.

lcol

line color of arrow - not used.

arr.col

arrow color. One value or a matrix, with same dimensions as flowmat; if a matrix, each arrow can have a different color.

val

logical indicating whether to write flow values as a legend.

val.digit

nr of digits for writing values - only if val =TRUE.

val.size

relative size for writing values - only if val =TRUE.

val.col

color for writing values - only if val =TRUE.

val.title

title for values legend - only if val =TRUE.

val.ncol

number of columns for writing values - only if val =TRUE.

budget

logical indicating whether to calculate budget (sum of flows in - sum of flows out) per component.

bud.digit

nr of digits for writing budget - only if budget =TRUE.

bud.size

relative size for writing budget - only if budget =TRUE.

bud.title

title for budget legend - only if budget =TRUE.

bud.ncol

number of columns for writing budget - only if budget =TRUE.

maxarrow

maximal thickness of arrow.

minarrow

minimal thickness of arrow.

length

length of the edges of the arrow head (in inches).

dcirc

if cannibalism (flow from i to i), offset of circular 'arrow' - if dcirc = 0:no circle drawn.

bty

the type of box to be drawn around the legends (legend, val, budget). The allowed values are "o" (the default) and "n".

...

extra arguments passed to R-function arrows.

Details

This function is less flexible than function plotmat

It is meant for visualisation of food web flows, that are inputted as a flow matrix.

It displays the elements on a circle, and, where there is a mass flow, two elements are connected,

the magnitude of the web flows is reflected by the thickness of the arrow

Note that the input matrices from function plotmat and plotweb are transposed.

Author(s)

Karline Soetaert <karline.soetaert@nioz.nl>

See Also

plotmat,

Rigaweb, Takapotoweb

try: demo(plotweb)

Examples

plotweb(Rigaweb, main = "Gulf of Riga food web",
        sub = "mgC/m3/d", val = TRUE)

ArrCol <- Rigaweb
ArrCol[] <- "black"
ArrCol[,"Sedimentation"] <- "green"

plotweb(Rigaweb, main = "Gulf of Riga food web",
        sub = "mgC/m3/d", val = FALSE, arr.col = ArrCol)

plotweb(diag(20), main = "plotweb")

[Package diagram version 1.6.5 Index]