title: How to set the yaxis to equal xaxis geom_point with facet_wrap
body: <p>I am plotting a fairly simple scatterplot using ggplot.
  I am mainly interested in illustrating a correlation between the x and y axis.
  Therefore, I would like the limits of the xaxis to equal that of the yaxis.</p>
  
  <pre><code>ggplot(VV,aes(x=R1_Zsc,y=R2_Zsc)) +
    geom_point() +
    stat_smooth() +
    facet_wrap(~variable, scales="free")
  </code></pre>
  
  <p>I tried the variants below but that didn't work either:</p>
  
  <pre><code>ggplot(VV, aes(x=R1_Zsc,y=R2_Zsc)) +
    geom_point() +
    stat_smooth() +
    xlim=range(c(VV$R1_Zsc,VV$R2_Zsc)) +
    ylim=range(c(VV$R1_Zsc,VV$R2_Zsc)) +
    facet_wrap(~variable, scales="free")
  </code></pre>
  
  <p>I have made a data frame containingt he xlimits and y limits for each variable, and thought I could use this, but I'm not sure how.</p>
  
  <pre><code>df_rng &lt;- ddply(VV, .(variable), summarise, min=range(c(R1_Zsc,R2_Zsc))[1],max=range(c(R1_Zsc,R2_Zsc))[2])
  </code></pre>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks, <code>coord_fixed(ratio=1)</code> does not seem to work. I want to set the <code>xlim</code> and <code>ylim</code> to the same values.</p>
  
  <p>Here is the output plot
  <a href="https://i.stack.imgur.com/uHzgQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uHzgQ.png" alt="enter image description here"></a></p>
  
  <p>The example from the cars dataset produces the following graph:</p>
  
  <p><a href="https://i.stack.imgur.com/exyLE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/exyLE.png" alt="enter image description here"></a></p>