High-level functions for plotting trophic link properties.
PlotTLPS(community,
X,
Y,
xlab,
ylab,
axes.limits.equal = FALSE,
xlim = NULL,
ylim = NULL,
main = CPS(community)$title,
highlight.links = NULL,
lowlight.links = NULL,
colour.by,
colour.spec,
col = NULL,
symbol.by,
symbol.spec,
pch = NULL,
bg.by,
bg.spec,
bg = NULL,
cex.by = NULL,
cex.spec = NULL,
cex = NULL,
are.values = FALSE,
…)PlotPredationMatrix(community,
xlab='Consumer',
ylab='Resource',
resource.order,
consumer.order,
…)
PlotMRvMC(community,
xlab=Log10MLabel(community, name='italic(M)[consumer]'),
ylab=Log10MLabel(community, name='italic(M)[resource]'),
axes.limits.equal = TRUE,
…)
PlotMCvMR(community,
xlab=Log10MLabel(community, name='italic(M)[resource]'),
ylab=Log10MLabel(community, name='italic(M)[consumer]'),
axes.limits.equal = TRUE,
…)
PlotNRvNC(community,
xlab=Log10NLabel(community, name='italic(N)[consumer]'),
ylab=Log10NLabel(community, name='italic(N)[resource]'),
axes.limits.equal = TRUE,
…)
PlotNCvNR(community,
xlab=Log10NLabel(community, name='italic(N)[resource]'),
ylab=Log10NLabel(community, name='italic(N)[consumer]'),
axes.limits.equal = TRUE,
…)
PlotBRvBC(community,
xlab=Log10BLabel(community, name='italic(B)[consumer]'),
ylab=Log10BLabel(community, name='italic(B)[resource]'),
axes.limits.equal = TRUE,
…)
PlotBCvBR(community,
xlab=Log10BLabel(community, name='italic(B)[resource]'),
ylab=Log10BLabel(community, name='italic(B)[consumer]'),
axes.limits.equal = TRUE,
…)
an object of class Community
.
the name of a node or link property to plot on the x axis.
If the name begins with 'resource.' or 'consumer.', the remainder of the
name is assumed to be a node property and should meet the criteria of the
node.properties
parameter of TLPS
, otherwise the name
is assumed to be a link property and should meet the criteria of the
link.properties
parameter of TLPS
.
If are.values
is TRUE
then X
and Y
should be
vectors of length NumberOfTrophicLinks
.
plotted on the y axis; see X
.
title of the x axis.
title of the y axis.
logical - if TRUE
and xlim
and
ylim
are NULL
then the limits of the x and y axes will be
the same.
limits of the x axis
limits of the y axis
title of the plot
trophic links to be highlighted; either NULL
,
a vector of trophic link indices or a function that takes a
Community
as its only parameter and returns a data.frame
containing the columns `resource' and `consumer', which should
contain node names.
trophic links to be lowlighted; should meet criteria
of lowlight.links
.
trophic link colours property. Either NULL
, a vector
of length NumberOfTrophicLinks
or a name. If the name begins with
'resource.' or 'consumer.', the remainder of the name is assumed to be a
node property and should meet the criteria of the node.properties
parameter of TLPS
, otherwise the name is assumed to be a link
property and should meet the criteria of the link.properties
parameter of TLPS
.
trophic links colours specification. either NULL
or a named vector that maps values of colour.by
to plotting values.
trophic links colours.
trophic links symbols property; must meet the criteria of
colour.by
.
trophic links symbols specification specification; must
meet the criteria of colour.spec
.
trophic links symbols.
trophic links background colours property; must meet the
criteria of colour.by
trophic links background colours specification; must meet the
criteria of colour.spec
.
trophic links background colours.
trophic links cex property; must meet the criteria of
colour.by
cex values specification; must meet the criteria of
colour.spec
.
cex values.
logical - if TRUE
X
and Y
must be
vectors of values of length NumberOfTrophicLinks
.
the order in which to show resources. Either missing,
which implies the native node order, a vector of length
NumberOfTrophicLinks
containing the integer order of resources,
or the name of a property that meets the criteria of the properties
parameter of NPS
.
the order in which to show consumer; requirements
are the same as resource.order
.
other values to plot functions.
The general-purpose function PlotTLPS
plots one trophic-link
property against another.
If colour.by
/bg.by
/symbol.by
is NULL
and
community
has a node property named `category' then trophic-link
colours/background colours/symbols are given by `resource.category' using
colour.spec
/bg.spec
/symbol.spec
given by
DefaultCategoryColours
/DefaultCategorySymbols
.
PlotPredationMatrix
shows trophic links as a binary matrix with species
shown in node order, starting at the top-left. If row.node
and
col.order
are both missing (the default) or are the same, then a
dashed diagonal line is drawn. Points on the dashed line indicate
cannibalistic trophic links.
The convenience functions PlotMRvMC
, PlotMCvMR
, PlotNRvNC
,
PlotNCvNR
, PlotBRvBC
, PlotBCvBR
are `wrappers' around
PlotRankNPS
that plot a log10-transformed body mass, M, numerical
abundance, N, or biomass abundance, B.
Community
,
TLPS
,
PlotBSpectrum
,
PlotCircularWeb
,
PlotNPS
,
PlotNPSDistribution
,
PlotNSpectrum
,
PlotRankNPS
,
PlotWebByLevel
# NOT RUN {
data(TL84)
# The predation matrix
PlotPredationMatrix(TL84)
# The predation matrix with rows ordered by body mass
PlotPredationMatrix(TL84, resource.order='M')
# Colours and symbols by resource.category
PlotMCvMR(TL84)
# Colours and symbols by consumer.category
PlotMCvMR(TL84, bg.by='consumer.category', symbol.by='consumer.category',
colour.by='consumer.category')
# Consumer trophic height against resource log10(M)
PlotTLPS(TL84, 'resource.Log10M', 'consumer.TrophicHeight')
# Log10(M of resource / M of consumer) against consumer log10(M)
PlotTLPS(TL84, 'consumer.Log10M', 'Log10RCMRatio')
# }
Run the code above in your browser using DataLab