Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Visualize food chains of a given animal species
ResourceFunction["FoodWeb"][species] visualizes the predator-prey network for a specified species entity. | |
ResourceFunction["FoodWeb"][species,property] visualizes the food network for species based on property. | |
ResourceFunction["FoodWeb"][species,property,n] gives the graph obtained by starting with species and querying the property successively n times. |
| "Both" | show the species along with its predators and prey (default) |
| "Predator" | show the species and its predators |
| "Prey" | show the species and its prey |
Generate a graph illustrating predator-prey relations for cheetahs:
| In[1]:= |
| Out[1]= | ![]() |
Generate a graph based on a prey relation:
| In[2]:= |
| Out[2]= | ![]() |
Highlight an animal of interest:
| In[3]:= | ![]() |
| Out[3]= | ![]() |
Specify the layout of a graph:
| In[4]:= |
| Out[4]= | ![]() |
Predator-prey information is available for selected animal species only. Trying to visualize a non-animal species entity returns Missing:
| In[5]:= |
| Out[5]= |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License