title: How to fix the aspect ratio in ggplot?
body: <p>I'm trying to resize a plot to fit into my document, but I'm having difficulties getting the plotted diagram do be a square.</p>
  
  <p>Example:</p>
  
  <pre><code>pdf(file = "./out.pdf", width = 5, height = 5)
  p &lt;- ggplot(mydata, aes(x = col1, y = col2))
  print(p)
  aux &lt;- dev.off()
  </code></pre>
  
  <p>Although the limits for x and y are the same, the plot in the result isn't square. I guess that R makes the enclosing panel 5x5" but doesn't care about the actual diagram size.</p>
  
  <p>How can I <em>unsquash</em> my diagrams?</p>