plot_bipartite function

Plot a bipartite network, colour coding individual links according to whether they are stronger or weaker than expected under the null model

Plot a bipartite network, colour coding individual links according to whether they are stronger or weaker than expected under the null model

Acts as a wrapper for the bipartite package's plotweb function (Dormann et al., 2008), colour coding the links in the familiar bipartite plots according to whether they are stronger, weaker or consistent with the null model.

plot_bipartite( nullnet, signif.level = 0.95, edge.cols = c("#67A9CF", "#F7F7F7", "#EF8A62"), ... )

Arguments

  • nullnet: An object of class "nullnet" from generate_null_net
  • signif.level: An optional value specifying the threshold used for testing for 'significant' deviations from the null model. Defaults to 0.95
  • edge.cols: An optional character vector of length three specifying the colours for links in the bipartite plot: they should represent interactions that are weaker than expected, consistent with the null model and stronger than expected in that order. The default is a colourblind friendly blue, white and red scheme, using colorbrewer's Red-Blue colour scheme (Brewer 2017).
  • ...: Other arguments to be supplied to bipartite's plotweb function.

Returns

No return value, called for side effects.

Details

Extensive options can be passed to plotweb

to customise the network plot beyond the colour coding of the links. See the appropriate help file in the bipartite package for details.

Examples

# Run the null model set.seed(1234) sil.null <- generate_null_net(Silene[, 2:7], Silene.plants[, 2:6], sims = 10, c.samples = Silene[, 1], r.samples = Silene.plants[, 1]) # Basic plot plot_bipartite(sil.null) # With alternative colour scheme and nodes width in the lower level proportional # to mean floral abundance mean.abunds <- colMeans(Silene.plants[, 2:6]) plot_bipartite(sil.null, signif.level = 0.95, edge.cols = c("#67a9cf", "#F7F7F7", "#ef8a62"), low.abun = mean.abunds, abuns.type = "independent", low.abun.col = "black", high.abun.col = "black", high.lablength = 0, low.lablength = 0)

References

Brewer, C.A. (2017) https://colorbrewer2.org/

Dormann, C.F., Gruber B. & Frund, J. (2008). Introducing the bipartite package: analysing ecological networks. R news, 8 , 8-11.

Vaughan, I.P., Gotelli, N.J., Memmott, J., Pearson, C.E., Woodward, G. & Symondson, W.O.C. (2018) econullnetr: an R package using null models to analyse the structure of ecological networks and identify resource selection. Methods in Ecology and Evolution, 9 , 728--733.

See Also

generate_null_net, bipartite_stats, plotweb

  • Maintainer: Ian Vaughan
  • License: MIT + file LICENSE
  • Last published: 2021-06-02

Useful links