plotDiet | R Documentation |
Plots the proportions with which each prey species contributes to the total
biomass consumed by the specified predator species, as a function of the
predator's size. These proportions are obtained with
getDiet()
.
plotDiet(
object,
species = NULL,
time_range,
wlim = c(1, NA),
return_data = FALSE
)
plotlyDiet(object, species = NULL, time_range, wlim = c(1, NA), ...)
object |
An object of class MizerSim or MizerParams. |
species |
The name of the predator species for which to plot the diet. |
time_range |
The time range (either a vector of values, a vector of min and max time, or a single value) to average the abundances over. Default is the final time step. Ignored when called with a MizerParams object. |
wlim |
A numeric vector of length two providing lower and upper limits for the w axis. Use NA to refer to the existing minimum or maximum. |
return_data |
A boolean value that determines whether the formatted data used for the plot is returned instead of the plot itself. Default value is FALSE |
... |
Other arguments (currently unused) |
Prey species that contribute less than 1 permille to the diet are suppressed in the plot.
A ggplot2 object, unless return_data = TRUE
, in which case a data
frame with the three variables 'w', 'Proportion', 'Prey' is returned.
getDiet()
Other plotting functions:
animateSpectra()
,
plotResourceLevel()
,
plotResourcePred()
,
plotSpectra()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.