【发布时间】:2020-10-20 13:42:33
【问题描述】:
我使用 ggarange 将一组 R 图排列成一个,如何在每个子图的左上方将它们标记为 A、B 和 C?
代码:
library(ggplot2)
library(ggpubr)
# default ggplot2 theme
P1 <- ggplot(iris, aes(Sepal.Length, Petal.Width, color = Species)) +
geom_point()
P2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_point()
P3 <- ggplot(iris, aes(Petal.Length, Sepal.Width, color = Species)) +
geom_point()
ggarrange(P1, P2, P3, ncol=3, nrow=1, common.legend = TRUE, legend="bottom")
【问题讨论】: