plot_age_comp_fit: Create a set of barplots by year with the bars being observed...

View source: R/plot-age-comp-fit.R

plot_age_comp_fitR Documentation

Create a set of barplots by year with the bars being observed age comps and errorbars being the MCMC fits with 95% credible interval

Description

Create a set of barplots by year with the bars being observed age comps and errorbars being the MCMC fits with 95% credible interval

Usage

plot_age_comp_fit(
  model,
  type = c("fishery", "survey"),
  ages = NULL,
  n_col = 4,
  x_breaks = seq(2, max(ages), by = 2),
  y_breaks = c(0, 0.2, 0.4, 0.6),
  axis_title_font_size = 14,
  axis_tick_font_size = 12,
  axis_label_color = "black",
  label_loc = c(ages[length(ages)] - 2, 0.45),
  label_font_size = 5,
  point_size = 1.5,
  whisker_width = 0.15
)

Arguments

model

A model, created by create_rds_file()

type

The type of fits/observations to plot. Must be either fishery or survey

ages

A vector of ages to show on the x-axis

n_col

The number of columns for the facets (years)

x_breaks

The x-axis breaks passed to ggplot2::scale_x_discrete()

y_breaks

The y-axis breaks passed to ggplot2::scale_y_continuous()

axis_title_font_size

The font size for the axis titles

axis_tick_font_size

The font size for the axis tick labels

axis_label_color

Color for the axis labels and tick labels

label_loc

The x-y location of the labels in each panel (vector of 2)

label_font_size

The label font size

point_size

The point size. Passed to ggplot2::geom_point()ends of the errorbar

whisker_width

The width (size) of the top and bottom bars on the


pacific-hake/hake-assessment documentation built on Nov. 8, 2024, 1:16 p.m.