plotBiomass: Plot the biomass of each species through time

plotBiomassR Documentation

Plot the biomass of each species through time

Description

After running a projection, the biomass of each species can be plotted against time. The biomass is calculated within user defined size limits (see getBiomass). This plot is pretty easy to do by hand. It just gets the biomass using the getBiomass method and plots using the ggplot2 package. You can then fiddle about with colours and linetypes etc. Just look at the source code for details.

Plot the biomass using a therMizerSim object.

Usage

plotBiomass(object, ...)

## S4 method for signature 'therMizerSim'
plotBiomass(object, print_it = TRUE,
  start_time = as.numeric(dimnames(object@n)[[1]][1]),
  end_time = as.numeric(dimnames(object@n)[[1]][dim(object@n)[1]]), ...)

Arguments

object

An object of class therMizerSim.

...

Other arguments to pass to getBiomass method, for example min_w and max_w

print_it

Display the plot, or just return the ggplot2 object. Default value is TRUE

start_time

The first time step to be plotted. Default is the beginning of the time series.

end_time

The first time step to be plotted. Default is the end of the time series.

Value

A ggplot2 object

See Also

getBiomass

Examples

## Not run: 
data(NS_species_params_gears)
data(inter)
params <- therMizerParams(NS_species_params_gears, inter)
sim <- project_therMizer(params, effort=1, t_max=20, t_save = 2)
plotBiomass(sim)
plotBiomass(sim, min_w = 10, max_w = 1000)

## End(Not run)

pwoodworth-jefcoats/Size-Based-Modeling documentation built on Sept. 15, 2023, 8:13 a.m.