title: ggplot: Legend truncated after saving as .jpeg
body: <p>I try to create stacked bar plots with my data in <code>ggplot</code>.
  The result in the Java GD active window looks fine, but after saving it as <code>jpeg</code> (or <code>pdf</code> or <code>tiff</code>), the legend is truncated.
  I managed to put the legend in the upper left, but then the legend's box will be truncated after saving.
  Any idea for this? Thanks!</p>
  
  <p><code>run under r console/ jaguar/ R version 3.5.0 (2018-04-23) -- "Joy in Playing"
  Platform: i386-w64-mingw32/i386</code> (32-bit)</p>
  
  <pre><code>ggplot(data=ilc_fusion, aes(x=ASMA_dich_deu, fill=CD34_deu)) +
  geom_bar() + 
  labs(x="ASMA+ Myofibroblasten", y="Anzahl") + 
  labs(fill= "Anteil CD34+ Fibrozyten") + 
  scale_fill_brewer()
  </code></pre>
  
  <p>Alternative code:</p>
  
  <pre><code>ggplot(data=ilc_fusion, aes(x=ASMA_dich_deu, fill=CD34_deu)) +
  geom_bar() + 
  labs(x="ASMA+ Myofibroblasten", y="Anzahl") + 
  labs (fill= "Anteil CD34+ Fibrozyten") + 
  scale_fill_brewer() + 
  theme (legend.justification=c(0,1), legend.position=c(0,1))
  </code></pre>
  
  <p>This is how it looks like in the Java Window:</p>
  
  <p><a href="https://i.stack.imgur.com/0oMvEl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0oMvEl.jpg" alt="enter image description here"></a></p>
  
  <p>And this is how it looks like after saving as jpeg: </p>
  
  <p><a href="https://i.stack.imgur.com/hzxQCl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hzxQCl.jpg" alt="enter image description here"></a></p>
  
  <p>and</p>
  
  <p><a href="https://i.stack.imgur.com/X4jGIl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X4jGIl.jpg" alt="enter image description here"></a></p>
  
  <p>I appreciate your help!</p>