plot_species_bar: Make single species bar plots

View source: R/plot_species_bar.R

plot_species_barR Documentation

Make single species bar plots

Description

Make condition time series bar plots for single species.

Usage

plot_species_bar(
  x,
  region,
  var_x_name = "year",
  var_y_name,
  var_y_se_name,
  fill_color = "#0085CA",
  y_title = "Length-weight residual (ln(g))",
  set_intercept = NULL,
  write_plot = TRUE
)

Arguments

x

Input data.frame

region

Region. AI, BS, or GOA. Character (1L).

var_x_name

Name of the x (time variable). Character (1L).

var_y_name

Name of the y variable in the data.frame. Character (1L).

var_y_se_name

Name of the standard error for the y variable. Character (1L).

y_title

Y-axis title. Character (1L).

set_intercept

Intercept to use for plots. Numeric (1L). 0 for residual, 1 for VAST relative condition, NULL for VAST a

write_plot

Should plots be written to the /plot/ directory?

fill_colors

Fill color to use for bars. Character (1L).

Value

A list of bar plots as ggplot objects

Examples

# EBS single species stratum bar plots

names(EBS_INDICATOR$STRATUM)

plot_species_stratum_bar(
x = EBS_INDICATOR$STRATUM,
region = "BS",
var_x_name = "year",
var_y_name = "stratum_resid_mean",
var_y_se_name = "stratum_resid_se",
y_title = "Length-weight residual (ln(g))",
write_plot = FALSE)

sean-rohan-NOAA/akfishcondition documentation built on June 9, 2025, 3:54 p.m.