With p1, p2, and p3 being three ggplots, you can try using grid.arrange() this way:
left=textGrob("", gp = gpar(fontface = "bold", cex=1.2), rot = 90)
bottom=textGrob("", gp = gpar(fontface = "bold", cex=1.2), hjust=-0.4)
top=textGrob("", gp = gpar(fontface = "bold", cex=1.2))
P1<-arrangeGrob(p1, top = textGrob("(A)", x = unit(0.17, "npc"), y= unit(0.3, "npc"), just=c("left","top"), gp=gpar(col="black", fontsize=12, fontface="bold", fontfamily="Times Roman")))
P2<-arrangeGrob(p2, top = textGrob("(B)", x = unit(0.17, "npc"), y= unit(0.3, "npc"), just=c("left","top"), gp=gpar(col="black", fontsize=12, fontface="bold", fontfamily="Times Roman")))
P3<-arrangeGrob(p3, top = textGrob("(C)", x = unit(0.17, "npc"), y= unit(0.3, "npc"), just=c("left","top"), gp=gpar(col="black", fontsize=12, fontface="bold", fontfamily="Times Roman")))
grid.arrange(P1, P2, P3, ncol=2, bottom=bottom, left=left, top=top)
There is also plot_grid(), which less flexible but much faster to use, example:
plot_grid(g3, g5, labels=c("(A)", "(B)"), ncol =1 , nrow =1)
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example:
https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Theo Mouton |
Freshwater Research Assistant |
+64-7-859-1889 | Gate 10 Silverdale Road, Hillcrest, Hamilton | www.niwa.co.nz |
To ensure compliance with legal requirements and to maintain cyber security standards, NIWA's IT systems are subject to ongoing monitoring, activity logging and auditing. This monitoring and auditing service may be provided by third parties. Such third parties can access information transmitted to, processed by and stored on NIWA's IT systems. |