plot_index: Plot an index

View source: R/plot_index.R

plot_indexR Documentation

Plot an index

Description

plot_index takes output from a VAST run and plots a panel figure of time-series estimates

Usage

plot_index(
  Index_ctl,
  sd_Index_ctl = array(0, dim(Index_ctl)),
  year_labels = NULL,
  years_to_plot = NULL,
  strata_names = NULL,
  category_names = NULL,
  scale = "uniform",
  plot_legend = NULL,
  DirName = getwd(),
  PlotName = "Index.png",
  interval_width = 1,
  width = NULL,
  height = NULL,
  xlab = "Year",
  ylab = "Index",
  bounds_type = "whiskers",
  col = NULL,
  col_bounds = NULL,
  Yrange = c(0, NA),
  type = "b",
  plot_lines_args = list(),
  plot_args = list(),
  SampleSize_ctz = NULL,
  Y2range = c(0, NA),
  y2lab = "",
  add = FALSE,
  ...
)

Arguments

Index_ctl

A matrix or array of time-series estimates for multiple categories c, years t, and strata l

sd_Index_ctl

A matrix or array of variances for each estimate

year_labels

character vector specifying names for labeling times t_i

years_to_plot

integer vector, specifying positions of year_labels for plotting (used to avoid plotting years with no data, etc.)

strata_names

names for spatial strata

category_names

names for categories (if using package `VAST`)

plot_legend

Add legend for labelling colors

DirName

Directory for saving plot and table

PlotName

Name for plot

interval_width

width for confidence intervals

width

plot width in inches

height

plot height in inches

Yrange

lower and upper bound for left-hand y-axis, corresponding to input Index_ctl (use Yrange[1]=NA and/or Yrange[2]=NA for using the lower and upper bound of estimate intervals)

plot_lines_args

additional arguments to pass to plot_lines

plot_args

additional arguments to pass to plot

SampleSize_ctz

optional array of sample sizes for each category and year to be plotted on each panel

Y2range

lower and upper bound for right-hand y-axis, corresponding to input SampleSize_ctz (see Yrange for more info)

...

list of settings to pass to par when making plot


James-Thorson/FishStatsUtils documentation built on Feb. 6, 2024, 4:26 a.m.