Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 色调/簇绒包装中的主栏图形宽度_R_R Markdown_Knitr_Tint_Tufte - Fatal编程技术网

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)
```
生成此输出:


完美!谢谢