From 142c2efa05be70964a9c6079802bba73152fa3b2 Mon Sep 17 00:00:00 2001 From: alexanderbates Date: Sun, 27 Oct 2024 01:33:53 -0400 Subject: [PATCH] Update ggplot2.R --- R/ggplot2.R | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/R/ggplot2.R b/R/ggplot2.R index e0fbd6a..ae7e5af 100644 --- a/R/ggplot2.R +++ b/R/ggplot2.R @@ -215,8 +215,14 @@ banc_neuron_comparison_plot <- function(neuron1 = NULL, # Save if(!is.null(filename)){ - ggplot2::ggsave(filename, plot = ga, width = width, height = height, - bg = "#fcfcfa", dpi = 300, limitsize = FALSE) + ggplot2::ggsave(filename, + plot = ga, + width = width, + height = height, + bg = "#fcfcfa", + dpi = 300, + limitsize = FALSE, + create.dir = TRUE) message("saved as: ", filename) invisible() }else{