有没有办法让grid.arrange()像split.screen ()一样工作?我想将一个表格安排在图例正下方。
#create histogram
my_hist<-ggplot(diamonds, aes(clarity, fill=cut)) + geom_bar()
#create inset table
my_table<- tableGrob(head(diamonds)[,1:3],gpar.coretext =gpar(fontsize=8),gpar.coltext=gpar(fontsize=8), gpar.rowtext=gpar(fontsize=8))
grid.arrange(my_hist,my_table, ncol=2)
生成的图像为:
但我想让它看起来大致像这样:
我尝试使用split.screen(),但似乎无法与ggplot类型的图形一起使用。有什么建议吗?谢谢。
opts
。 - durum