Skip to contents

This functions creates a barplot with the abundance of each species within a given size range.

Usage

plotTotalAbundance(
  object,
  stack = FALSE,
  species = NULL,
  min_fishing_l = NULL,
  max_fishing_l = NULL,
  return_data = FALSE,
  ...
)

plotlyTotalAbundance(object, ...)

Arguments

object

An object of class MizerParams or MizerSim. If a MizerSim object is provided, the abundance at the last time step is used.

stack

A boolean value that determines whether bars are separated by species. Defaults to FALSE. If true, returns a stacked barplot with the total biomass for each species instead of individual bars for each species. Useful for comparison between steady states.

species

The species to be selected. Optional. By default all species are selected. A vector of species names, or a numeric vector with the species indices, or a logical vector indicating for each species whether it is to be selected (TRUE) or not.

min_fishing_l

The minimum length (cm) for abundance estimates. Defaults to smallest size.

max_fishing_l

The maximum length (cm) of for abundance estimates. Defaults to max length.

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.

...

unused

Value

A ggplot2 object