View source: R/plot_stratum_species_bar.R
plot_species_stratum_bar | R Documentation |
Make condition time series bar plots with separate panels for each stratum.
plot_species_stratum_bar(
x,
region,
var_x_name,
var_y_name,
var_y_se_name,
y_title = "Length-weight residual (ln(g))",
var_group_name = "stratum",
fill_title = "Stratum",
fill_palette = "BrBG",
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). |
var_group_name |
Name of the variable to use for grouping (i.e., stratum). Character (1L). |
fill_title |
Name of the fill variable to use for plotting. Character (1L). |
fill_palette |
Character vector denoting which color palette to use. Must be a valid name for RColorBrewer::brewer.pal(name = fill_palette) |
write_plot |
Should plots be written to the /plot/ directory? |
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))",
var_group_name = "stratum",
fill_title = "Stratum",
fill_palette = "BrBG",
write_plot = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.