
Plot the fisheries productivity of two models or two different size ranges in the same plot
Source:R/reef-analysis_plots.R
plot2Productivity.RdWhen called with a MizerParams object the steady state productivities are plotted.
Usage
plot2Productivity(
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,
...
)
plotly2Productivity(object1, object2, ...)Arguments
- object1
First MizerParams or MizerSim object.
- object2
Second MizerParams or MizerSim object.
- 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 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
plotProductivityobjectAn object of class MizerParams or MizerSim
start_timeThe first time to be plotted. Default is the beginning of the time series.
end_timeThe last time to be plotted. Default is the end of the time series.
facetA boolean value indicating whether to facet the result plot by species group. Defaults to TRUE.
totalA boolean value that determines whether the total productivity from all species is plotted as well. Default is TRUE.
include_invertsA boolean value that determines whether the "inverts" species group is included. Default is FALSE, since invertebrate productivity is typically not relevant to fishing yield. Only takes effect when
speciesis not explicitly provided.include_reproA boolean value that indicates whether to include energy for reproduction in productivity estimates. Defaults to using
getEGrowthTime()if FALSE or mizer'smizer::getEReproAndGrowth()if TRUE.min_fishing_lThe minimum length (cm) of fished individuals for productivity estimates. Defaults to 7 cm.
max_fishing_lThe maximum length (cm) of fished individuals for productivity estimates. Defaults to max length.
Value
A ggplot2 object, unless return_data = TRUE, in which case a data
frame with the the productivity for each Species Group
by model is returned.
See also
plotBiomass(), plot2TotalBiomass(), plotTotalBiomassRelative(),
plotProductivity(), plot2Productivity(), plotProductivityRelative()
Other plotting functions:
plot2TotalBiomass(),
plotDegScale(),
plotDegradationScale(),
plotProductivity(),
plotProductivityRelative(),
plotRefugeDensity(),
plotRefugeProfile(),
plotRelativeContribution(),
plotSpectraChange(),
plotTotalAbundance(),
plotTotalBiomass(),
plotTotalBiomassRelative(),
plotVulnerable()