I would like to remove the large spacing that is inserted by default between the plots and the table in a grid.arrange, as shown in the MWE hereafter:
require(ggplot2)
require(gridExtra)
list1=data.frame(mtcars[1:3, ]) # Dummy data
p1 = ggplot(list1, aes(mpg,cyl)) + geom_point() # Dummy plot
p2 = ggplot(list1, aes(disp,hp)) + geom_point() # Dummy plot
plots <- arrangeGrob(p1, p2,nrow=2)
table <- tableGrob(list1)
grid.arrange(plots, table)
I suspect this behaviour is due to the tableGrob, but I couldn't find any answer treating this issue.
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…