全部 - 关于这个确切的主题还有其他几个问题,但没有一个能够解决我面临的问题。这是一个简单的代码片段。任何人都可以建议这里的问题是什么?gList中只允许使用grob
> grid.arrange(plot(rnorm(1000)),hist(rnorm(1000)), nrow=2, ncol=1)
Error in gList(list(wrapvp = list(x = 0.5, y = 0.5, width = 1, height = 1, :
only 'grobs' allowed in "gList"
@John Coleman是对的,基本图形不是'grobs'。如果你真的想使用'grid.arrange',你可以尝试在这个问题中使用'grab_grob'函数。 http://stackoverflow.com/questions/33826249/force-a-regular-plot-object-into-a-grob-for-use-in-grid-arrange –