2015-10-06 66 views
1

我有一个R标记,我编织到RStudio内的HTML。我可以使用fig.width和fig.height来调整我的图的分辨率,但我似乎无法扩大页面输出,以便文本输出不会打包,或者使得图显得更大。我曾尝试:Knitr忽略宽度和out.width选项

```{r} 
options(width=2000) 
``` 

```{r} 
knitr::opts_knit$set(width=2000) 
``` 

```{r,out.width=2000} 
``` 

输出页面宽度不会改变。任何帮助将非常感激。

回答

0

该RMD文件产生不同的地块面积:

--- 
title: "Untitled" 
author: "Me" 
date: "6 - 10 - 2015" 
output: html_document 
--- 
I have a R Markdown that I knit to html from within RStudio. I can use fig.width and fig.height to adjust the resolution of my plots but I can't seem to widen the page output so that text output doesn't wrap or so that the plots appear physically larger. I have tried: 

```{r} 
options(width=2000) 
``` 
and 

```{r} 
knitr::opts_knit$set(width=2000) 
plot(cars) 
``` 
and 

```{r,out.width=2000} 
#using out.width=2000 
plot(cars) 
``` 
or 
```{r,fig.width=4} 
#using fig.width=4 
plot(cars) 
``` 

enter image description here

+0

是改变图形的大小,但仍仅限于页面大小。我想增加我猜的页面大小。增加fig.width工作,直到fig.width == \ linewidth那么输出图像只是调整大小,但没有物理上更大。我可以设置fig.width = 2000,这将是blury,我仍然必须眯起眼睛来制作小文本。 –