From 62e7cf2b60d4c17dcc5263ad0df319a03f71b2db Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Sun, 1 Sep 2024 03:37:02 -0400 Subject: [PATCH] Fix theme_grey() in theme_publication --- workflow/apps/r/calculate_interaction_zscores5.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/workflow/apps/r/calculate_interaction_zscores5.R b/workflow/apps/r/calculate_interaction_zscores5.R index 08a1fbe9..75c82d36 100644 --- a/workflow/apps/r/calculate_interaction_zscores5.R +++ b/workflow/apps/r/calculate_interaction_zscores5.R @@ -62,8 +62,11 @@ dir.create(file.path(args$out_dir, "zscores"), showWarnings = FALSE) dir.create(file.path(args$out_dir, "zscores", "qc"), showWarnings = FALSE) # Define themes and scales -theme_publication <- function(base_size = base_size, base_family = "sans", legend_position = "bottom") { - theme_foundation(base_size = base_size, base_family = base_family) + +# Define themes and scales +theme_publication <- function(base_size = 14, base_family = "sans", legend_position = "bottom") { + theme_foundation <- ggplot2::theme_grey(base_size = base_size, base_family = base_family) + + theme_foundation %+replace% theme( plot.title = element_text(face = "bold", size = rel(1.2), hjust = 0.5), text = element_text(), @@ -85,6 +88,7 @@ theme_publication <- function(base_size = base_size, base_family = "sans", legen ) } + scale_fill_publication <- function(...) { discrete_scale("fill", "Publication", manual_pal(values = c( "#386cb0", "#fdb462", "#7fc97f", "#ef3b2c", "#662506",