Skip to contents

When 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 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 plotProductivity

object

An object of class MizerParams or MizerSim

start_time

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

end_time

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

facet

A boolean value indicating whether to facet the result plot by species group. Defaults to TRUE.

total

A boolean value that determines whether the total productivity from all species is plotted as well. Default is TRUE.

min_fishing_l

parameters be passed to getProductivity(). The minimum length (cm) of fished individuals for productivity estimates. Defaults to 7 cm.

max_fishing_l

parameters be passed to getProductivity(). The 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.