如何增加grid.arrange的大小(tableGrob,ggplotGrob)

时间:2015-08-14 04:25:30

标签: r gridextra

最近开始使用grid / gridExtra并一直试图计算如何增加grobs的大小。不知道为什么,纸上似乎还有很多房地产边缘空间。如何增加尺寸?以下是knitr和rmarkdown制作的PDF文件。

enter image description here

---
title: "Untitled"
output: pdf_document
classoption: landscape
---


```{r, echo=FALSE}
library(gridExtra)
library(ggplot2)
a <- read.csv(text='"State","Abbreviation", "age"
"Alabama","AL", "7"
"Alaska","AK", "8"
"Arizona","AZ", "3"
"Arkansas","AR", "4"
"California","CA", "4"')

tbla <- tableGrob(a, )
tblb <- ggplotGrob(ggplot(cars, aes(dist, speed)) + geom_point() + geom_smooth(method=loess))
grid.arrange(tbla, tblb)
```

0 个答案:

没有答案