title: plotting a circle inside a square in R
body: <p>I am trying to make a simple illustration where a circle is plotted inside a square. I have used the <code>rect()</code> function from the <code>grid</code> package and the <code>draw.circle()</code> function from the <code>plotrix</code> package before so I thought this would be simple. But clearly I am missing something. </p>
  
  <p>The following code seems to me like it should work:</p>
  
  <pre><code>require(plotrix)
  require(grid)
  
  plot(c(-1, 1), c(-1,1), type = "n")
  rect( -.5, -.5, .5, .5) 
  draw.circle( 0, 0, .5 )
  </code></pre>
  
  <p>however I end up with the circle lapping out of the square in the vertical dimension like this:</p>
  
  <p><img src="https://i.stack.imgur.com/mRomT.png" alt="enter image description here"></p>
  
  <p>What in the heck am I missing? </p>
  
  <p>If you have a simpler way of plotting circles and squares, I'd love to know about it. But I'd also like to know why my method above does not work. </p>
  
  <p>Thanks!</p>