O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling the display

The default size of an R presentation is 960 x 700 pixels. However, adding a specific width or height to a slide can change its default size:

Slide with plot 
======================================================== 
title: false 
```{r renderplot,echo=FALSE,out.width="1920px"} 
plot(cars) 
``` 

If the entire plot is not displayed in the slide when viewed in a browser, you can include fig.width and fig.height as follows:

Slide with plot 
======================================================== 
title: false 
```{r renderplot,echo=FALSE, fig.width=8,fig.height=4, 
out.width="1920px"} 
plot(cars) 
``` 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required