Trophic Networks Analysis

Version 2.0 - May 2017

The n_w computer program is designed for the study of the structure and functionnalities of trophic networks (food webs), and more generally systems represented by a directed graph. It is convivial and easy to use.

n_w program download

The n_w program is distributed free of charge. Users are under their own responsibility.

Computer / System



PC Windows

Self-extracting file

Double-click on autonw.exe

It will expand in a user chosen directory 

 After installation, the n_w directory should contain:

How to run the n_w program?

What is a food web?

A food web is a set of species related by trophic interactions (who eats whom) within an ecosystem. A food web comprising S species can be represented by a directed graph or network whose nodes are the species and whose arcs describe the feeding links. In the network representing the food web, there is an arrow joining each prey (resource) species to its predator (consumer) species.
A food web can be represented by a (0,1)-matrix A = (aij) of size S, where aij = 1/0 depending of the presence/absence of a feeding link between species i and species j. A matrix W = (wij) ascribing non negative weights wij to trophic links can also be introduced (A and W have the same non zero entries). The matrix of weights represents biological values associated with trophic interactions, like energy flux, probability of capture, consumption rate.

What is provided by the n_w program?

With the n_w program, several food webs can be studied simultaneously, observed ones, which are specified in text files, or synthetic (random) ones, which are created using predefined models. The studied networks can be edited and displayed graphically. Results are stored in text and graphic files.

Analysis of structural and functional properties of empirical and synthetic trophic networks:

(A) Representation of an aquatic food web according to trophic height.
Number of species S = 71, number of links L = 229.
(B) The same network partitionned into 3 modules (red, green, blue nodes).
Data from Lazzaro & al. 2009.


Gauzens B, S Legendre, X Lazzaro & G Lacroix. 2013. Food-web aggregation, methodological and functional issues. Oikos 122:16061615.
Gauzens B, E Thébault, G Lacroix & S Legendre. 2015. Trophic groups and modules: two levels of group detection in food webs. Journal of the Royal Society Interface 12, 20141176. 
Gauzens B, S Legendre, X Lazzaro & G Lacroix. 2016. Intermediate predation pressure leads to maximal complexity in food webs. Oikos 125: 595-603.
Lazzaro X, G Lacroix, B Gauzens, J Gignoux & S Legendre. 2009. Predator foraging behaviour drives food-web topological structure. Journal of Animal Ecology 78:1307–1317.
Pimm SL. 2002. Food Webs. The University of Chicago Press.


Stéphane Legendre & Benoît Gauzens
Ecole Normale Supérieure
46 rue d'Ulm
75005 Paris

Web Site of Stéphane Legendre

Mail to Stéphane Legendre


Jacques Gignoux, Gérard Lacroix, Xavier Lazzaro, Elisa Thébault.