plot_scaled_abundance: ———————- Plot the median SSB as a line, with...

View source: R/figures.R

plot_scaled_abundanceR Documentation

———————————————————————————————– Plot the median SSB as a line, with points which are survey index scaled by catchability value for the survey

Description

———————————————————————————————– Plot the median SSB as a line, with points which are survey index scaled by catchability value for the survey

Usage

plot_scaled_abundance(
  df,
  model,
  gear,
  new_surv_yr = NA,
  point_size = 1,
  line_size = 0.75,
  prod_yrs = 1990:1999,
  show_prod_yrs = TRUE,
  xlim = NA,
  show_x_axis = TRUE,
  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 = "a",
  show_legend = FALSE,
  translate = FALSE
)

Arguments

df

Data frame of the survey estimates, as constructed by [get_surv_ind()]

model

an iscam model object

gear

a gear data frame containing 'gear', 'gearname', and 'qind' columns

new_surv_yr

the year when the survey changed from surface to dive

point_size

size for points

line_size

thickness of line

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_legend

Logical

translate

Logical. If TRUE, translate to french

Value

A ggplot object


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