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, return_data = FALSE)

## Arguments

object An object of class MizerSim or MizerParams. The name of the predator species for which to plot the diet. A boolean value that determines whether the formatted data used for the plot is returned instead of the plot itself. Default value is FALSE

## Value

A ggplot2 object, unless return_data = TRUE, in which case a data frame with the three variables 'w', 'Proportion', 'Prey' is returned.

## Details

Prey species that contribute less than 1 permille to the diet are suppressed in the plot.

getDiet()

Other plotting functions: animateSpectra(), plot,MizerSim,missing-method, plotBiomass(), plotFMort(), plotFeedingLevel(), plotGrowthCurves(), plotPredMort(), plotSpectra(), plotYieldGear(), plotYield(), plotting_functions

## Examples

# \donttest{
plotDiet(NS_params, species = "Cod")

# Returning the data frame
fr <- plotDiet(NS_params, species = "Cod", return_data = TRUE)
str(fr)
#> 'data.frame':	812 obs. of  3 variables:
#>  $w : num 0.486 0.58 0.693 0.827 0.987 ... #>$ Proportion: num  0.00113 0.00139 0.0017 0.00208 0.00254 ...
#>  \$ Prey      : Factor w/ 13 levels "Resource","Saithe",..: 13 13 13 13 13 13 13 13 13 13 ...
# }