title: Making square axes in R
body: <p>How can I use R to make axes always square in scatter plots? for example in:</p>
  
  <pre><code>&gt; plot(iris)
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&gt; plot(iris$Petal.Width, iris$Petal.Length)
  </code></pre>
  
  <p>I'd like the axes to be square, i.e. the same length and tick labels for the x and y axes.</p>
  
  <p>The current proposed answer does not work: the call, </p>
  
  <pre><code>plot(iris$Petal.Width, iris$Petal.Length, xlim=c(0,10), ylim=c(0,10), asp=1)
  </code></pre>
  
  <p>Generates:</p>
  
  <p><img src="https://i.stack.imgur.com/ZJMDr.png" alt="enter image description here"></p>
  
  <p>which is not square, and does not have the same axis ticks and tick labels. The spaces between the x tick labels must be the same and the plot should be square, not rectangular. </p>