plot_index_mpd: Plot MPD index fits or residuals for iSCAM models

View source: R/plot-index-mpd.R

plot_index_mpdR Documentation

Plot MPD index fits or residuals for iSCAM models

Description

Plot MPD index fits or residuals for a single or group of models by gear

Usage

plot_index_mpd(
  models,
  type = c("fits", "resids"),
  surv_index,
  gear = NULL,
  start_year = 1995,
  end_year = 2021,
  append_base_txt = NULL,
  legend_title = "Models",
  palette = iscam_palette,
  base_color = "black",
  dodge = 0.3,
  index_line_width = 0.5,
  index_point_size = 2,
  index_color = "chocolate3",
  fit_line_width = 0.5,
  fit_point_size = 2,
  leg_loc = c(1, 1),
  angle_x_labels = FALSE
)

Arguments

models

A list of iscam model objects (class mdl_lst_cls)

type

Either 'fits' or 'resids' for model fits or residuals respectively

surv_index

The survey_index data frame which is dat$survey_index if dat is the output from the gfdata::get_survey_index() function

gear

A vector of gear numbers to show panels for. If NULL, all will be shown. If a gear number out of range is included, a lookup table with gear numbers and names will be shown

start_year

Year to start the plot

end_year

Year to end the plot

append_base_txt

A vector of strings to append to the model names for display on the plot legend or title

legend_title

Title for legend

palette

A palette value that is in RColorBrewer::brewer.pal.info

base_color

A color to prepend to the brewer colors which are set by palette. This is called base_color because it is likely to be a base model

dodge

Amount to offset multiple model points on x-axis (in years)

index_line_width

The index data error bar and connecting line width

index_point_size

The index data point size

index_color

The color used for the observed index lines and points

fit_line_width

The model fit error bar and connecting line width

fit_point_size

The model fit point size

leg_loc

A two-element vector describing the X-Y values between 0 and 1 to anchor the legend to. eg. c(1, 1) is the top right corner and c(0, 0) is the bottom left corner

angle_x_labels

If TRUE put 45 degree angle on x-axis tick labels

See Also

Other Time series plotting functions: plot_biomass_grid_mcmc(), plot_biomass_mcmc(), plot_biomass_mpd(), plot_biomass_proj_mcmc(), plot_catch_fit_mcmc(), plot_f_mcmc(), plot_index_mcmc(), plot_q_mcmc(), plot_rdevs_mcmc(), plot_recr_grid_mcmc(), plot_recr_mcmc(), plot_recr_mpd(), plot_ts_mcmc(), plot_vuln_mcmc()


pbs-assess/gfiscamutils documentation built on Oct. 24, 2024, 1:37 p.m.