Use sd bars, not se, in plate analysis plots

This commit is contained in:
2024-09-26 03:35:16 -04:00
parent 51aa2589be
commit 376a299066

View File

@@ -578,18 +578,19 @@ generate_scatter_plot <- function(plot, config) {
} }
} }
# Add Error Bars if specified # Add error bars if specified
if (!is.null(config$error_bar) && config$error_bar && !is.null(config$y_var)) { if (!is.null(config$error_bar) && config$error_bar && !is.null(config$y_var)) {
y_mean_col <- paste0("mean_", config$y_var) y_mean_col <- paste0("mean_", config$y_var)
y_se_col <- paste0("se_", config$y_var) y_sd_col <- paste0("sd_", config$y_var)
plot <- plot + plot <- plot +
geom_errorbar( geom_errorbar(
aes( aes(
ymin = !!sym(y_mean_col) - !!sym(y_se_col), ymin = !!sym(y_mean_col) - !!sym(y_sd_col),
ymax = !!sym(y_mean_col) + !!sym(y_se_col) ymax = !!sym(y_mean_col) + !!sym(y_sd_col)
), ),
alpha = 0.3 alpha = 0.3,
linewidth = 0.5
) )
} }