Set R Markdown preview to same size as knitted document and ggsave

I am trying to get the figure preview in an R Markdown document to display the same as the knitted version and the ggsave version. I need to play around with some label positions so I need to re-run the plotting code many times to get the right settings. I could look at the saved file but it would be faster to use the preview inside R Studio.

Unfortunately, when I set the fig.width and fig.height options, the preview does not respect these options. It resizes the figure to fill the device size. Is there a way to get the preview in R Studio to be identical to the knitted version? Here's a minimum working example with screenshots to show the issue:

The knitted and ggsave versions do not appear the same. I can't upload more than one image as a new user.

Here is the ggsave version.

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