Set the plot size inside a R markdown

I'm working on a R markdown.

My problem is: inside the markdown I have the following chunk of code:


which generates the following image:

but as you can see, the texts are overlapped.

In the other hand, if I run the same command on the console, and click the button: "Preview" for the plot generated on the right panel, so the image covers the entire screen, then I can read the text properly.

My question is: is it out there any way to make the generated image on the R markdown to be bigger? There is no problem if when the image gets embedded on the HTML it is small, but at least, I would like that when I drag drop the image out to another tab, I can read the text properly.


What happens if you try the options fig.height and fig.width?

In case you don't know, there are lots of options documented here:


R for Data Science also has some concise and experience-tested advice for handling figure sizing in R Markdown:


thank you guys, you are awesome!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.