generated labelled ps_plots_combined.R and capital "P" for position in barplots coloured aa for Lig

This commit is contained in:
Tanushree Tunstall 2020-10-06 18:15:50 +01:00
parent 315f7b1e0e
commit 4368c061c7
2 changed files with 31 additions and 14 deletions

View file

@ -219,6 +219,7 @@ p2 = g2 +
, colour = "black"
, fill = "lightgray"
, stat = "identity") +
scale_y_continuous(limits = c(0, 450))+
theme(axis.text.x = element_blank()
, axis.text.y = element_text(size = my_ats
, angle = 0
@ -235,17 +236,33 @@ p2
########################################################################
# end of DUET barplots #
########################################################################
#=======
# output
#=======
ps_plots_combined = "af_or_combined_PS.svg"
plot_ps_plots_combined = paste0(plotdir,"/", ps_plots_combined )
#============================
# combined plot 1: UNlabelled
#============================
ps_combined = "af_or_combined_PS.svg"
plot_ps_combined = paste0(plotdir,"/", ps_combined)
cat("combined plot Unlabelled:", plot_ps_combined)
svg(plot_ps_plots_combined , width = 26, height = 12)
#theme_set(theme_gray()) # to preserve default theme
printFile = cowplot::plot_grid(p1, p2, p3
svg(plot_ps_combined , width = 26, height = 12)
OutPlot_combined = cowplot::plot_grid(p1, p2, p3
, ncol = 1
, align = 'v')
printFile
OutPlot_combined
dev.off()
#============================
# combined plot 2: labelled
#============================
ps_combined_labelled = "af_or_combined_PS_labelled.svg"
plot_ps_combined_labelled = paste0(plotdir,"/", ps_combined_labelled)
cat("combined plot Labelled:", plot_ps_combined_labelled)
svg(plot_ps_combined_labelled , width = 26, height = 12)
OutPlot_combined_labelled = cowplot::plot_grid(p1, p2, p3
, ncol = 1
, labels = c("(a)", "(b)", "(c)")
, label_size = 21
, align = 'v'
, hjust = -0.4)
OutPlot_combined_labelled
dev.off()