| plotBiomass | R Documentation |
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()).
plotBiomass(
object,
species = NULL,
tlim = c(NA, NA),
y_ticks = 6,
ylim = c(NA, NA),
total = FALSE,
background = TRUE,
highlight = NULL,
log = NULL,
return_data = FALSE,
log_x = FALSE,
log_y = TRUE,
use_cutoff = FALSE,
...
)
object |
An object of class MizerSim |
species |
The species to be selected. Optional. By default all target 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. |
tlim |
A numeric vector of length two providing lower and upper limits
for the time axis, e.g. |
y_ticks |
The approximate number of ticks desired on the y axis. |
ylim |
A numeric vector of length two providing lower and upper limits
for the y axis. Use |
total |
A boolean value that determines whether the total biomass from all species is plotted as well. Default is FALSE. |
background |
A boolean value that determines whether background species are included. Ignored if the model does not contain background species. Default is TRUE. |
highlight |
Name or vector of names of the species to be highlighted. |
log |
Character string specifying which axes should use log10 scales,
in the same form as the base |
return_data |
A boolean value that determines whether the formatted data used for the plot is returned instead of the plot itself. Default is FALSE. |
log_x |
If |
log_y |
If |
use_cutoff |
If TRUE, the |
... |
Arguments setting the size range over which the biomass is
calculated (see
|
A ggplot2 object, unless return_data = TRUE, in which case a data
frame with the four variables 'Year', 'Biomass', 'Species', 'Legend' is
returned.
plotting_functions, getBiomass()
Other plotting functions:
addPlot(),
animate(),
plot,
plot2(),
plotCDF(),
plotCDF2(),
plotDiet(),
plotFMort(),
plotFeedingLevel(),
plotGrowthCurves(),
plotMizerParams,
plotMizerSim,
plotPredMort(),
plotRelative(),
plotSpectra(),
plotSpectra2(),
plotSpectraRelative(),
plotYield(),
plotYieldGear(),
plotYieldVsF(),
plotting_functions
plotBiomass(NS_sim)
plotBiomass(NS_sim, species = c("Sandeel", "Herring"), total = TRUE)
plotBiomass(NS_sim, tlim = c(1980, 1990))
# Returning the data frame
fr <- plotBiomass(NS_sim, return_data = TRUE)
str(fr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.