Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plot not filling the slide in R presentation

Tags:

r

rstudio

If I make a default R presentation in Rstudio, everything looks okay, but the plot doesn't fill the whole slide.

enter image description here

This is the same whether in full screen or in the browser.

The documentation says "When the only content on a slide is an image, then the image will fill all available space on the slide". And it mentions that same goes for plots.

What am I missing here? What do I need to do to have the plot fill the whole slide?

I updated my RStudio to Version 0.99.903

like image 827
Tom Avatar asked Aug 24 '16 11:08

Tom


People also ask

Why isn't my plot showing up in RStudio?

Tools->Global options->R Mark down In that phase select "window" from that list in the "show output preview in:" then apply. Tools > Global Options > Pane Layout, "Plots" is checked. Update the RStudio.

How do I make a slideshow in R?

To create a new R Presentation you execute the New File -> R Presentation command: After specifying the location to save the presentation, a new presentation will be created and a preview will show within the Presentation tab in the upper right corner of the IDE.

How do I embed a plot in R markdown?

You can embed an R code chunk like this: ```{r} summary(cars) ``` You can also embed plots, for example: ```{r, echo=FALSE} plot(cars) ``` Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.


1 Answers

Use out.width="100%" in your chunk options

{r, echo=FALSE, out.width="100%"}

like image 132
eotp Avatar answered Oct 26 '22 00:10

eotp