这是一个MWE:
library(ggpubr)
# Box plot (bp)
bxp <- ggboxplot(ToothGrowth, x = "dose", y = "len",
color = "dose", palette = "jco")
bxp
# Dot plot (dp)
dp <- ggdotplot(ToothGrowth, x = "dose", y = "len",
color = "dose", palette = "jco", binwidth = 1)
dp
ggarrange(bxp, dp, bxp + rremove("x.text"),
labels = c("A", "B", "C"),
ncol = 2, nrow = 2)
ggarrange(bxp,
ncol = 2, nrow =2)
我做了2个图表。第一个在 2 x 2 网格中有 3 个图形。
第二个在 2 x 2 网格中也有 1 个图形。这样,最初的 3 个图和最后 1 个图的大小相同。
如何在 2 x 1 网格中创建最后一个图形,但它应该保持与 2 x 2 网格中相同的大小?