【发布时间】:2022-12-01 18:16:06
【问题描述】:
我正在写 R ggplot,我正在用 grid.arrange 安排多个图。
有没有办法在两个图之间添加一些词? 我希望输出像红色的字样。
谢谢您的帮助 :)
library(ggplot2)
library(gridExtra)
P1 <- ggplot(mtcars, aes(x = mpg)) +
geom_histogram()
P2 <- ggplot(mtcars, aes(x = wt)) +
geom_histogram()
grid.arrange(P1, *I want to add some information here*,P2, ncol = 1, nrow = 2)
【问题讨论】: