title: R ggplot2 - no background or grid lines in plot with RGui
body: <p>I'm having a strange problem with the output window in RGui (under Win XP). I should see a plot like the one below...</p>
  
  <p><a href="https://i.stack.imgur.com/JojeO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JojeO.png" alt="alt text"></a>
  </p>
  
  <p>... when I run this script:</p>
  
  <pre><code>library(ggplot2)
  x &lt;- rnorm(100,0,1)
  y &lt;- rnorm(100,0,1)
  z &lt;- data.frame(x,y) 
  g &lt;- ggplot(z, aes(x,y)) + geom_point() + theme_gray()
  </code></pre>
  
  <p>Instead, in the plot window it shows a white background and white grid lines, like below.</p>
  
  <p><strong>R Plot Window</strong></p>
  
  <p><a href="https://i.stack.imgur.com/fW2lV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fW2lV.png" alt="alt text"></a>
  </p>
  
  <p>When I export the plot to .png and I "preview" it in windows explorer - it doesn't show a background or grid lines. </p>
  
  <p><strong>Png in Windows</strong></p>
  
  <p><a href="https://i.stack.imgur.com/fW2lV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fW2lV.png" alt="alt text"></a></p>
  
  <p><strong>Same Png in Gimp</strong></p>
  
  <p><a href="https://i.stack.imgur.com/JojeO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JojeO.png" alt="alt text"></a></p>
  
  <p><strong>Same Png uploaded to image hosting</strong></p>
  
  <p><a href="https://i.stack.imgur.com/JojeO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JojeO.png" alt="alt text"></a></p>
  
  <p>Any ideas about what's going on? How can I get the plot to display correctly in RGui?</p>