Plot age-specific assessment components across assessment years

plot_assessment_age_component(
  future.list,
  assessment.years,
  component = c("selectivity", "F", "weight", "maturity", "number"),
  minyear = NULL,
  maxyear = NULL,
  reference = NULL,
  reference_shape_col = NULL,
  reference_shape = 4,
  ncol = 3,
  ylab = NULL,
  y_scale = c("identity", "sqrt"),
  show_points = component != "selectivity",
  linetype_values = c("dashed", "solid"),
  base_size = 11,
  value_fun = mean,
  estimate_label = NULL,
  prediction_label = "Predicted"
)

Arguments

future.list

A list of future result objects.

assessment.years

Numeric or character vector of assessment years.

component

Character scalar. One of `"selectivity"`, `"F"`, `"weight"`, `"maturity"`, or `"number"`.

minyear, maxyear

Optional numeric limits for years to draw.

reference

Optional data frame with columns `age` and `value` to overlay as reference points.

reference_shape_col

Optional column name in `reference` mapped to point shape.

reference_shape

Shape used when `reference_shape_col = NULL`.

ncol

Number of facet columns.

ylab

Y-axis label. If `NULL`, a component-specific label is used.

y_scale

Either `"identity"` or `"sqrt"`.

show_points

Logical. If `TRUE`, points are added to component lines.

linetype_values

Character vector passed to [ggplot2::scale_linetype_manual()].

base_size

Base font size passed to [ggplot2::theme_bw()].

value_fun

Function used to summarise across simulations.

estimate_label, prediction_label

Labels used for years before and after the assessment year.

Value

A ggplot object. The long table used for plotting is attached as the `"plot_data"` attribute.