在 RMarkdown 中调整图像大小 [英] Resizing images in RMarkdown
本文介绍了在 RMarkdown 中调整图像大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将 R markdown .Rmd
文档转换为 .pdf
.不幸的是,图像太大了.有没有办法改变图像的大小?我不能使用 html,这是 pdf 的降价.
I'm trying to convert a R markdown .Rmd
document to .pdf
. Unfortunately, the images are too large. Is there any way to change the size of the image? I Can't use html, this is markdown to pdf.
推荐答案
在块的开头使用:
分配给 fig.height
和 fig.width
的小数被解释为英寸.如果明确,也允许使用其他度量单位.
Decimals assigned to fig.height
and fig.width
are interpreted as inches. Other units of measure also allowed if explicit.
```{r, echo=FALSE, fig.height=2.7, fig.width=9}
#your R code here
```
这篇关于在 RMarkdown 中调整图像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文