plot.pacea_biomass_herring: Plot a herring biomass time series object for one or all...

View source: R/plot-pacea-biomass-herring.R

plot.pacea_biomass_herringR Documentation

Plot a herring biomass time series object for one or all herring regions

Description

Adapted slightly from 'plot.pacea_recruitment_herring()'. Plots in the biomass style developed in 'plot.pacea_biomass()'.

Usage

## S3 method for class 'pacea_biomass_herring'
plot(
  obj,
  region = NULL,
  x_lab = "Year",
  y_lab = attr(obj, "axis_name"),
  mar_all_regions = c(3, 3, 2, 0),
  oma_all_regions = c(2, 1, 1, 1),
  y_tick_by = 5,
  title = "full",
  ...
)

Arguments

obj

a 'pacea_biomass_herring' object, which is a tibble of annual spawning biomass or total biomass estimates (TODO not yet implemented) for each of the five herring Stock Assessment Regions.

region

if 'NULL' (the default) then plots a panel plot of biomass for all five regions, else plots the specified region, which must be one of HG, PRD, CC, SOG, or WCVI.

x_lab

label for x-axis (default is "Year", only shown for bottom panel when plotting all five regions)

y_lab

label for y-axis (default is specified by 'attr(obj, "axis_name")'.

mar_all_regions

'mar' value for 'par()', may need tweaking for five-panel plot; for single-panel just specific 'mar'; see '?par'

oma_all_regions

similar to 'mar_all_regions'

y_tick_by

increment for y-axis ticks; gets overwritten in 'add_tickmarks()' if this yields more than 'y_tick_max_number' tickmarks. If using [plot.pacea_biomass()] the default of 1 gets automatically changed to 0.25 for 'plot(hake_biomass)'.

title

if 'NULL' then no figure title (using 'main()'), if 'full' (the default) then spell out the Stock Assessment Region, and if 'short' then just use the acronym.

...

further options passed onto 'plot.pacea_biomass()' that can also pass onto 'plot.default()'

Value

plot of the herring biomass time series as joined up medians with shaded regions showing uncertainty, for either all regions or the specified region.

Author(s)

Andrew Edwards

Examples

## Not run:  TODO


## End(Not run)

pbs-assess/PACea documentation built on April 17, 2025, 11:36 p.m.