plot_recruitment: Plot recruitment as points and errorbars

View source: R/figures.R

plot_recruitmentR Documentation

Plot recruitment as points and errorbars

Description

Plot recruitment as points and errorbars

Usage

plot_recruitment(
  model,
  point_size = 1,
  line_size = 1,
  prod_yrs = 1990:1999,
  show_prod_yrs = TRUE,
  xlim = NA,
  show_x_axis = FALSE,
  show_y_axis = TRUE,
  x_axis_label_size = 8,
  x_axis_tick_label_size = 8,
  y_axis_label_size = 8,
  y_axis_tick_label_size = 8,
  x_axis_label_newline_length = 50,
  y_axis_label_newline_length = 40,
  x_axis_position = "bottom",
  y_axis_position = "left",
  annot = "c",
  show_r0 = TRUE,
  line_size_r0 = 0.5,
  r0_ribbon_alpha = 0.35,
  translate = FALSE
)

Arguments

model

an iscam model object

point_size

Size of points for median recruitment

line_size

thickness of errorbars

prod_yrs

Numeric vector. Productive period to calculate the USR. Default 1990:1999.

show_prod_yrs

Logical. Show vertical band for productive period. Default TRUE.

xlim

x-limits for the plot. Implemented with [ggplot2::coord_cartesian()]

show_x_axis

see [modify_axes_labels()]

show_y_axis

see [modify_axes_labels()]

x_axis_label_size

see [modify_axes_labels()]

x_axis_tick_label_size

see [modify_axes_labels()]

y_axis_label_size

see [modify_axes_labels()]

y_axis_tick_label_size

see [modify_axes_labels()]

x_axis_label_newline_length

see [newline_format()]

y_axis_label_newline_length

see [newline_format()]

annot

a character to place in parentheses in the top left of the plot. If NA, nothing will appear

show_r0

Add horizontal like for unfished recruitment R_0, and shaded rectangle for CI.

line_size_r0

Thickness for horizontal line

r0_ribbon_alpha

Alpha for R_0 rectangle (uncertainty).

translate

Logical. If TRUE, translate to french

Value

A ggplot object


pbs-assess/herringutils documentation built on Jan. 10, 2025, 8:43 a.m.