R 色调/簇绒包装中的主栏图形宽度
我有以下R 色调/簇绒包装中的主栏图形宽度,r,r-markdown,knitr,tint,tufte,R,R Markdown,Knitr,Tint,Tufte,我有以下Rmd文件,它使用基于tufte包的tint包: --- title: "Test title" author: "" date: "" output: tint::tintPdf classoption: twoside --- ```{r one, echo=FALSE, fig.width=8} plot(pressure) ``` ```{r two, echo=FALSE, fig.width=4} pl
Rmd
文件,它使用基于tufte
包的tint
包:
---
title: "Test title"
author: ""
date: ""
output:
tint::tintPdf
classoption: twoside
---
```{r one, echo=FALSE, fig.width=8}
plot(pressure)
```
```{r two, echo=FALSE, fig.width=4}
plot(pressure)
```
我希望第二个图形的宽度是第一个图形的一半,但这两个图形似乎都是主列的宽度,我实际上只是通过指定fig.width
来改变纵横比
使用tint
/tufte
时,图形是否可能比主列的宽度窄
PS压力
来自数据集
软件包
编辑 我可以这样假装:
```{r two, echo=FALSE, fig.width=4}
par(mfrow = c(1, 2))
plot(pressure)
```
但是有没有一个更简单的解决方案呢?您可以使用
out.width
chunk选项来实现。这需要是一个字符值,作为宽度插入到LaTeX中,而不仅仅是像fig.width
这样的数字。例如,将第二个块更改为
```{r two, echo=FALSE, out.width="2in"}
plot(pressure)
```
生成此输出:
完美!谢谢