updating the function

This commit is contained in:
Tanushree Tunstall 2020-10-31 19:52:18 +00:00
parent 9c67a208e2
commit 6575fc7aba
2 changed files with 48 additions and 38 deletions

18
boxplot_with_stats.R Executable file → Normal file
View file

@ -62,15 +62,21 @@ p2 = p2 + stat_pvalue_manual(stat_npa2
, hide.ns=T
, tip.length = 0)+
scale_y_continuous(expand = expansion(mult = c(0.05, 0.25))) +
scale_x_discrete()
plots[[i]] <- p2
}
#============================
# combine: cowplot_plot_grid
#============================
#cowplot::plot_grid(plotlist=plots, align = 'hv', ncol=2, nrow=2)
pdf("test.pdf", width = 22, height = 16)
cowplot::plot_grid(plotlist=plots, align = 'hv', ncol=7, nrow=5)
dev.off()
#===========================
# combine: ggpubr::ggarrange
#===========================
pdf("test2.pdf", width = 22, height = 16)
npa_plot<- ggpubr::ggarrange(plotlist = plots, align = "hv"
, ncol = 7
, nrow = 5
@ -86,9 +92,7 @@ annotate_figure(npa_plot,
#fig.lab = "Figure 1", fig.lab.face = "bold"
)
pdf("test.pdf", width = 22, height = 16)
cowplot::plot_grid(plotlist=plots, align = 'hv', ncol=7, nrow=5)
dev.off()
##################################################################
#=======
# facet