我似乎找不到通过grid.arrange增加两个图之间间距的解决方案。我不知道该怎么继续,也不想改变图的大小或其他任何内容。
grid.arrange(plot1, plot2, ncol=2)
下面的内容是后来添加的:
这是我的代码:
x11()
cs <- grid.arrange(arrangeGrob(b, a, ncol=2, top = textGrob(
"B", vjust = 0.5, hjust = 19.5, gp = gpar(
fontface = "bold", cex = 1.5)),
left = textGrob(~ Delta * "SCR (p - d)" ~ mu * 'S',
gp=gpar(fontsize=18), rot = 90, vjust = 1)))
soc_sph <- grid.arrange(arrangeGrob(p, g, ncol=2, top = textGrob(
"A", vjust = 0.5, hjust = 19.5, gp = gpar(
fontface = "bold", cex = 1.5)),
left = textGrob(~ Delta * "SCR (p - d)" ~ mu * 'S',
gp=gpar(fontsize=18), rot = 90, vjust = 1)))
grid.arrange(soc_sph, cs, ncol=2)
因此,在最后一个grid.arrange中,需要增加soc_sph和cs之间的间距。