plot_selex_posteriors: Plot the selectivity parameter estimates from all posteriors...

View source: R/plot-selex-posteriors.R

plot_selex_posteriorsR Documentation

Plot the selectivity parameter estimates from all posteriors as many lines with an overlaid errorbar for each age

Description

Plot the selectivity parameter estimates from all posteriors as many lines with an overlaid errorbar for each age

Usage

plot_selex_posteriors(
  model = NULL,
  type = c("fishery", "survey"),
  n_posts = NULL,
  age_range = NULL,
  show_xlab = TRUE,
  post_line_width = 0.1,
  post_line_color = "black",
  post_line_alpha = 0.1,
  post_med_line_width = 1,
  post_med_line_color = "blue3",
  post_med_line_alpha = 1,
  post_line_gap = ts_linegap,
  post_med_point_size = 3,
  unc_line_width = 1,
  unc_line_color = "blue3",
  unc_line_alpha = 1,
  unc_point_size = 3,
  glow = FALSE,
  glow_offset = 0.5,
  glow_color = "white",
  glow_alpha = 1
)

Arguments

model

A model list, created by create_rds_file()

type

One of 1 or 2 where 1 = Fishery and 2 = Acoustic age 2+ survey

n_posts

The number of posterior lines to plot. The lines are randomly drawn from all posteriors. if this is larger than the number of posteriors, all posterior lines will be shown

age_range

A vector of two for the min and max ages to plot. If NULL, all ages in the data will be plotted

show_xlab

Logical. If TRUE, show the X-axis label. If FALSE, omit it

post_line_width

Thickness of the posterior lines

post_line_color

Color of the posterior lines

post_line_alpha

Transparency of the posterior lines

post_med_line_width

Thickness of the median posterior line

post_med_line_color

Color of the median posterior line

post_med_line_alpha

Transparency of the median posterior line

post_med_point_size

Size of the points on the median posterior line

unc_line_width

Thickness of the uncertainty lines

unc_line_color

Color of the uncertainty lines and points

unc_line_alpha

Transparency for the uncertainty lines and points

unc_point_size

Size of the points

glow

Logical. If TRUE, add a white glow around the lines so that they can more easily be seen in contrast to the background posterior lines

glow_offset

The amount to add to the thickness of the lines and diameter of the points to create the glow effect

glow_color

Color of the glow effect

glow_alpha

Transparency of the glow effect

probs

A vector of two quantiles to include for the uncertainty

Value

A ggplot2::ggplot() object


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