Plot consumption as a directed graph including all taxa (vertices) and biomass consumed (arrows). Taxa are located using tracers, where by default the y-axis is trophic level. #'
plot_foodweb(
Q_ij,
type_i,
xtracer_i,
ytracer_i = rep(1, nrow(Q_ij)),
B_i = rep(1, nrow(Q_ij)),
taxa_labels = letters[1:nrow(Q_ij)],
xloc,
yloc
)
invisibly return ggplot
object for foodweb
Consumption of each prey i by predator j in units biomass.
character vector indicating whether a taxon is "hetero", "auto", or "detritus"
tracer to use when computing x-axis values
tracer to use when computing y-axis values
biomass to use when weighting taxa in plot
character vector of labels to use for each taxon
x-axis location (overrides calculation using xtracer_i
)
y-axis location (overrides calculation using ytracer_i
)
Trophic level \(l_i\) for each predator \(i\) is defined as:
$$ \mathbf{l - 1 = l Q^*} $$
where \(\mathbf{Q*}\) is the proportion consumption for each predator (column) of different prey (rows). We identify primary producers as any taxa with no consumption (a column of 0s), and assign them as the first trophic level.