File Exchange

image thumbnail

Plot Food Web

version 1.4.0.3 (11.9 KB) by Francisco de Castro
Functions for ecological modelling

3 Downloads

Updated 06 Dec 2019

GitHub view license on GitHub

PLOTFOODWEB makes it easy to produce beautiful 3D or 2D figures of ecological food webs. The only required argument is the adjacency matrix of predator-prey connections. Sizes, colors, trophic levels, and the spatial arrangement can be specified as optional arguments. The submission figure shows three possibilities. In the top-left is the default type. The top-right is high-quality with random arrangement and the size of spheres as a function of the Log of body mass. At the bottom, a biplot where species are arranged according to mass (X-axis) and trophic level (Y-axis).

Cite As

Francisco de Castro (2019). Plot Food Web (https://www.github.com/capahaddock/Ecology), GitHub. Retrieved .

Comments and Ratings (4)

To Joel Sande:
I don't know what you mean. This is matlab, not C. There is no main(). How to use the function is explained typing "help plotfoodweb" at the matlab command prompt.

Joel Sande

I want to do something like that. But applied to neural network.

Please show in a main() how to use it.

Ronald: The data comes from the niche model (Williams & Martinez 2000), with S= 100 and C= 0.15 (if I remember correctly). I didn't save it after generating the figure.

Ronald

Please provide the example data as shown in the picture of the submission.

Updates

1.4.0.3

Connect to Github

1.4.0.2

Corrected detail in the help.

1.4.0.1

new figure

1.4.0.0

Add a new type of plot. Reorganize help

1.3.0.0

Correct brewer colormap problem
Correct minor typos in help

1.3.0.0

Use default color map if Brewer color function is not installed.

1.3.0.0

Added required function 'calcarc'

1.3.0.0

Forgot to include the file in previous update

1.3.0.0

Change 'mds' option in 'arrange' for 'pca' (principal components analysis).
Added option to color by kmeans clustering of adjacency matrix.

1.2.0.0

Ability to specify variable line colors.
Possibility to use curved lines

1.2.0.0

Ability to provide a full interactions matrix, not just adjacency matrix of 0 and 1.

1.1.0.0

Rearranged and improved help

1.1.0.0

Added missing function fwrotation

1.1.0.0

Option to plot in 2D
Option to arrange species by multidimensional scaling
Faster plotting
Optional transparency of lines

1.1.0.0

Option to plot the food web in 2D.
Option to arrange species in 3D with mutidimensional scaling
Faster plotting of cylinders connecting species
Optional transparency of lines

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Patchline