baptiste / gridExtra

Miscellaneous Functions for "Grid" Graphics
http://cran.r-project.org/web/packages/gridExtra/index.html
15 stars 4 forks source link

grid.arrange error with ggplot objects #26

Closed MGNute closed 8 years ago

MGNute commented 8 years ago

I think this should be a pretty basic function call, or at least it used to be, but something broke in grid.arrange when the arguments are strictly ggplot objects. I can't attach the data for a full minimal working example. Basically I have two ggplot objects and try to run the following command:

grid.arrange(Plot.0, Plot.1, ncol=1,main="Precision & Recall by p-distance")

And the output error message is:

Error in gList(list(grobs = list(list(x = 0.5, y = 0.5, width = 1, height = 1, : only 'grobs' allowed in "gList" In addition: Warning message: In grob$wrapvp <- vp : Coercing LHS to a list

It could be an issue with a different package but I ahven't been able to figure this out.

baptiste commented 8 years ago

use top instead of main