View source: R/plot_species_bar.R
plot_species_bar | R Documentation |
Make condition time series bar plots for single species.
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
)
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). |
A list of bar plots as ggplot objects
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.