These are simple plotting helpers to quickly visualize outputs from sim_abundance(), sim_distribution(), and related simulation functions.

plot_trend(sim, sum_ages = sim$ages, col = viridis::viridis(1), ...)

plot_surface(sim, mat = "N", xlab = "Age", ylab = "Year", zlab = mat, ...)

plot_grid(grid, ...)

plot_distribution(
  sim,
  ages = sim$ages,
  years = sim$years,
  type = "contour",
  scale = "natural",
  ...
)

plot_survey(sim, which_year = 1, which_sim = 1)

plot_total_strat_fan(sim, surveys = 1:5, quants = seq(90, 10, by = -10), ...)

plot_length_strat_fan(
  sim,
  surveys = 1:5,
  years = 1:10,
  lengths = 1:50,
  select_by = "year",
  quants = seq(90, 10, by = -10),
  ...
)

plot_age_strat_fan(
  sim,
  surveys = 1:5,
  years = 1:10,
  ages = 1:10,
  select_by = "year",
  quants = seq(90, 10, by = -10),
  ...
)

plot_error_surface(sim, plot_by = "rule")

plot_survey_rank(sim, which_strat = "age")

Arguments

sim

Object returned by sim_abundance(), sim_distribution(), etc.

sum_ages

Vector of ages to sum across.

col

Plot color.

...

Additional arguments passed to plotly::plot_ly().

mat

Name of the matrix in the sim list to plot.

xlab, ylab, zlab

Axis labels.

grid

Grid produced by make_grid().

ages

Subset the data to one or more ages.

years

Subset the data to one or more years.

type

Plot type: "contour" or "heatmap".

scale

Plot response on "natural" or "log" scale.

which_year

Subset to a specific year.

which_sim

Subset to a specific simulation replicate.

surveys

Subset the data to one or more surveys.

quants

Quantile intervals to display on the fan plot.

lengths

Subset the data to one or more length groups.

select_by

Select plot by "age", "length", or "year".

plot_by

Plot error surface by "rule" or "samples".

which_strat

Stratification focus: "total", "length", or "age".

Value

A plot of class plotly.