From be8fa7e639b06edfe89a2dcdf0bc6faf7662d6b3 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Fri, 18 Sep 2020 18:19:55 +0100 Subject: [PATCH] saving combined bubble plot with labels --- scripts/plotting/or_plots_combined.R | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/scripts/plotting/or_plots_combined.R b/scripts/plotting/or_plots_combined.R index 07e03e9..ff39284 100644 --- a/scripts/plotting/or_plots_combined.R +++ b/scripts/plotting/or_plots_combined.R @@ -54,6 +54,9 @@ cat(paste0("Variables imported:" or_combined = "or_combined_PS_LIG.svg" plot_or_combined = paste0(plotdir,"/", or_combined) +or_combined_labelled = "or_combined_PS_LIG_labelled.svg" +plot_or_combined_labelled = paste0(plotdir,"/", or_combined_labelled) + #or_kin_combined = "or_kin_combined_PS_LIG.svg" #plot_or_kin_combined = paste0(plotdir,"/", or_kin_combined) #======================================================================= @@ -182,17 +185,35 @@ p2 #====================== # combine using cowplot #====================== +#--------------- +# no labels +#--------------- svg(plot_or_combined, width = 32, height = 12) #svg(plot_or_kin_combined, width = 32, height = 12) theme_set(theme_gray()) # to preserve default theme -printFile = cowplot::plot_grid(plot_grid(p1, p2 +Outplot_or_combined = cowplot::plot_grid(plot_grid(p1, p2 , ncol = 1 , align = 'v' , labels = c("", "") , label_size = my_als+5)) -print(printFile) +print(Outplot_or_combined) dev.off() +#--------------- +# labels +#--------------- +svg(plot_or_combined_labelled, width = 32, height = 12) +#svg(plot_or_kin_combined, width = 32, height = 12) + +theme_set(theme_gray()) # to preserve default theme + +Outplot_or_combined_labelled = cowplot::plot_grid(plot_grid(p1, p2 + , ncol = 1 + , align = 'v' + , labels = c("(a)", "(b)") + , label_size = 20)) +print(Outplot_or_combined_labelled) +dev.off() \ No newline at end of file