plotEnergyBudget: Plot the energy budget of each species through size.

View source: R/plots.R

plotEnergyBudgetR Documentation

Plot the energy budget of each species through size.

Description

This budget is divided between growth, income, metabolic loss and reproduction.

Usage

plotEnergyBudget(
  object,
  species = NULL,
  logarithmic = TRUE,
  return_data = FALSE
)

plotlyEnergyBudget(object, species = NULL, logarithmic = TRUE, ...)

Arguments

object

An object of class MizerSim or MizerParams.

species

The name of the predator species for which to plot the mortality.

logarithmic

A boolean value that determines whether values should be displayed logarithmicly or linearly. Default is TRUE.

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)

Value

A ggplot2 object, unless return_data = TRUE, in which case a list composed of two slots is returned. First slot is a data frame with the four variables 'w', 'value', 'Type', 'Species and the second slot is a data frame with the five variables 'w_mat', 'w_max', 'Species', 'y_coord', 'Type' (to plot vertical lines).

See Also

plotting_functions

Other plotting functions: plotDeath(), plotResourceLevel(), plotResourcePred(), plotYieldVsF(), plotYieldVsSize()

Examples


plotEnergyBudget(NS_params, species = "Cod")

# Returning the data frame
fr <- plotEnergyBudget(NS_params, return_data = TRUE)
str(fr)


sizespectrum/mizerExperimental documentation built on Oct. 20, 2024, 4:09 a.m.