title: Inline plot size and knitted plot size don't agree in RStudio on retina display
body: <p>It turns out that setting plot sizes on a Mac with retina display can be challenging. I am not referring to file sizes or resolutions that can be taken care of with the fig.retina setting (I have seen several questions about that), but the fact that the actual figure layout differs between the inline version of a an RMarkdown script and both an exported version with the same dimensions (using ggsave) as well as a knitted version. Even small figure dimensions appear gigantic inline on the screen while they export and knit correctly. So, the ratio between font size and "plot size" (or whatever it would be called) appears to change. If I run the code on an older (non-retina) Macbook or a PC, the inline figure sizes are as expected.</p>
  
  <p><a href="https://i.stack.imgur.com/IITV3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IITV3.jpg" alt="enter image description here"></a></p>
  
  <p>This is an example of what I mean. The specified figure dimensions were fig.width=4, fig.height=3.</p>
  
  <p>Is there a way to get the inline graph dimensions match the knitted versions...?</p>
  
  <p>Thanks y'all!</p>
  
  <p>edit: code included, not sure how reproducible it is though, since it might only be relevant to users with retina or 4k displays:</p>
  
  <pre><code>---
  output: html_document
  ---
  
  ```{r setup, include=FALSE}
  knitr::opts_chunk$set(echo = TRUE)
  library(tidyverse)
  ```
  
  ```{r, fig.width=4, fig.height=3}
  Pdata &lt;- data.frame("X" = 1:10, "Y" = 1:10) # some data
  
  ggplot(data = Pdata,aes(x = X,y = Y)) +
    geom_point() +
    theme_bw(base_size = 20) +
    labs(x = "Some stuff", y = "Some more stuff")
  ```
  </code></pre>