plots a web, based on a flow matrix
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", ...)
flow matrix, rows=flow *from*, columns=flow *to*.
string vector with the names of components.
relative size of name label text.
start a new plot (FALSE
), or add to current (TRUE
).
if add = FALSE
: relative size of figure.
if add = FALSE
: main title.
if add = FALSE
: sub title.
ifadd = FALSE
: title in bottom.
logical indicating whether to scale the flow values logarithmically.
the figure margins.
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.
flowvalue corresponding to minimum arrow thickness.
flowvalue corresponding to maximum arrow thickness.
logical indicating whether to add a legend with arrow thickness.
nr of digits for writing legend - only if legend
= TRUE.
title for arrow legend, e.g to give units - only if
legend
=TRUE.
line color of arrow - not used.
arrow color. One value or a matrix, with same dimensions as flowmat; if a matrix, each arrow can have a different color.
logical indicating whether to write flow values as a legend.
nr of digits for writing values - only if val =TRUE
.
relative size for writing values - only if val =TRUE
.
color for writing values - only if val =TRUE
.
title for values legend - only if val =TRUE
.
number of columns for writing values - only if
val =TRUE
.
logical indicating whether to calculate budget (sum of flows in - sum of flows out) per component.
nr of digits for writing budget - only if
budget =TRUE
.
relative size for writing budget - only if
budget =TRUE
.
title for budget legend - only if
budget =TRUE
.
number of columns for writing budget - only if
budget =TRUE
.
maximal thickness of arrow.
minimal thickness of arrow.
length of the edges of the arrow head (in inches).
if cannibalism (flow from i to i), offset of circular 'arrow' -
if dcirc
= 0:no circle drawn.
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.
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.
try: demo(plotweb)
# NOT RUN {
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")
# }
Run the code above in your browser using DataLab