PlotTLPS {cheddar}R Documentation

Plot trophic-link properties

Description

High-level functions for plotting trophic link properties.

Usage

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,
          ...)

Arguments

community

an object of class Community.

X

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.

Y

plotted on the y axis; see X.

xlab

title of the x axis.

ylab

title of the y axis.

axes.limits.equal

logical - if TRUE and xlim and ylim are NULL then the limits of the x and y axes will be the same.

xlim

limits of the x axis

ylim

limits of the y axis

main

title of the plot

highlight.links

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.

lowlight.links

trophic links to be lowlighted; should meet criteria of lowlight.links.

colour.by

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.

colour.spec

trophic links colours specification. either NULL or a named vector that maps values of colour.by to plotting values.

col

trophic links colours.

symbol.by

trophic links symbols property; must meet the criteria of colour.by.

symbol.spec

trophic links symbols specification specification; must meet the criteria of colour.spec.

pch

trophic links symbols.

bg.by

trophic links background colours property; must meet the criteria of colour.by

bg.spec

trophic links background colours specification; must meet the criteria of colour.spec.

bg

trophic links background colours.

cex.by

trophic links cex property; must meet the criteria of colour.by

cex.spec

cex values specification; must meet the criteria of colour.spec.

cex

cex values.

are.values

logical - if TRUE X and Y must be vectors of values of length NumberOfTrophicLinks.

resource.order

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.

consumer.order

the order in which to show consumer; requirements are the same as resource.order.

...

other values to plot functions.

Details

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.

Author(s)

Lawrence Hudson

See Also

Community, TLPS, PlotBSpectrum, PlotCircularWeb, PlotNPS, PlotNPSDistribution, PlotNSpectrum, PlotRankNPS, PlotWebByLevel

Examples

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')

[Package cheddar version 0.1-636 Index]