【发布时间】:2019-08-20 19:31:46
【问题描述】:
我正在尝试使 png 图像更长,但我更改的任何设置都没有效果。在this 之后,下面显示了三种不同的尝试。这些选项会正确更改最后一个块中的 ggplot 对象。我正在使用 RMarkdown 和 knitr。
```{r setup, include=FALSE, echo=FALSE}
knitr::opts_chunk$set(fig.width=9, fig.height=6)
library(RODBC)
library(data.table)
library(Matrix)
library(doParallel)
library(tidyverse)
library(gridExtra)
```
```{r , echo=FALSE, fig.height=50 }
knitr::include_graphics("data_sim_plot.png")
```
```{r , echo=FALSE, out.height=50, fig.height=50 }
knitr::include_graphics("data_sim_plot.png")
```
```{r , echo=FALSE, out.height=50, fig.height=50 }
knitr::opts_current$set(fig.height=20)
knitr::include_graphics("data_sim_plot.png")
```
```{r, echo=FALSE}
# a different ggplot object
readRDS("gg.rds")
```
【问题讨论】:
标签: r r-markdown knitr