Plot the total biomass of two models or of two different size ranges in the same plot
plot2TotalBiomass.RdWhen called with a MizerParams object the steady state biomasses are plotted.
Usage
plot2TotalBiomass(
object1,
object2,
species = NULL,
name1 = "First",
name2 = "Second",
min_fishing_l1 = NULL,
max_fishing_l1 = NULL,
min_fishing_l2 = NULL,
max_fishing_l2 = NULL,
stack = FALSE,
return_data = FALSE,
...
)
plotly2TotalBiomass(object1, object2, species = NULL, ...)Arguments
- object1
First MizerParams or MizerSim object.
- object2
Second MizerParams or MizerSim object.
- species
The groups to be selected. Optional. By default all target groups are selected. A vector of groups names, or a numeric vector with the groups indices, or a logical vector indicating for each group whether it is to be selected (TRUE) or not.
- name1
An optional string with the name for the first model, to be used in the legend. Set to "First" by default.
- name2
An optional string with the name for the second model, to be used in the legend. Set to "Second" by default.
- min_fishing_l1
Optional. The minimum length (cm) of fished individuals for model 2. Defaults to 7cm. A parameter passed to
getProductivity().- max_fishing_l1
Optional. The maximum length (cm) of fished individuals for model 1. Defaults to max length. A parameter passed to
getProductivity().- min_fishing_l2
Optional. The minimum length (cm) of fished individuals for model 2. Defaults to 7cm. A parameter passed to
getProductivity().- max_fishing_l2
Optional. The maximum length (cm) of fished individuals for model 1. Defaults to max length. A parameter passed to
getProductivity().- 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 group instead of individual bars for each group. Useful for comparison between steady states.
- 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.
- ...
Arguments passed on to
plotTotalBiomassobjectAn object of class MizerParams
min_fishing_lThe minimum length (cm) for biomass estimates. Defaults to smallest size.
max_fishing_lThe maximum length (cm) of for biomass estimates. Defaults to max length.
Value
A ggplot2 object, unless return_data = TRUE, in which case a data
frame with the the total steady state biomass for each functional
group by model is returned as well as another column called
rel_diffthat gives the relative difference between the two
values.
See also
plotBiomass(), plot2TotalBiomass(), plotTotalBiomassRelative(),
plotProductivity(), plot2Productivity(), plotProductivityRelative()
Other plotting functions:
plot2Productivity(),
plotBiomass(),
plotProductivity(),
plotProductivityRelative(),
plotRefuge(),
plotRelativeContribution(),
plotSpectraRelative(),
plotTotalAbundance(),
plotTotalBiomass(),
plotTotalBiomassRelative(),
plotVulnerable()