saving combined bubble plot with labels

This commit is contained in:
Tanushree Tunstall 2020-09-18 18:19:55 +01:00
parent 7e8d5c869e
commit be8fa7e639

View file

@ -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()