Skip to contents

Plot the conditional probability of age given length and year from the model-ready paly input array.

Usage

plot_paly(
  fit = NULL,
  years = NULL,
  min_age = 5L,
  season = 1L,
  n_length_breaks = 6L,
  fill_option = "magma",
  fill_direction = -1L,
  data = NULL
)

Arguments

fit

An sbt_fit object, or a legacy model data list returned by get_data(). It must include paly, length_mu_ysa, first_yr, and min_age.

years

Optional integer vector of calendar years to plot. If NULL, the first and final years with non-zero PALY probabilities are shown.

min_age

Minimum age to display. The default, 5, matches the assessment data summary figures.

season

Integer season index used to map PALY length bins to length_mu_ysa. The default is 1.

n_length_breaks

Maximum number of y-axis length labels.

fill_option

Viridis palette option passed to scale_fill_viridis_c.

fill_direction

Palette direction passed to scale_fill_viridis_c.

data

Legacy named alias for a model data list.

Value

A ggplot2 object displaying PALY probabilities by age, length, and year.