title: Setting plot limits in R with aspect ratio of 1
body: <p>I am trying to plot a map of the Arctic in Polar stereographic projection. To do this I have imported an already projected shapefile into R using the rGDAL package:</p>
  
  <pre><code>ds &lt;- readOGR(dsn = path, layer = "10m_coastline_ps")
  </code></pre>
  
  <p>This creates a <code>SpatialLinesDataFrame</code>. Now when I plot this <code>SpatialLinesDataFrame</code> using the <code>plot()</code> function, I am unable to set the plot limits using the <code>xlim</code> and <code>ylim</code> parameters:</p>
  
  <pre><code>plot(ds, xlim=c(-1700000,1700000), ylim=c(-4000000,800000), axes=T)
  </code></pre>
  
  <p>The <code>plot()</code> function automatically sets the aspect ratio to 1 and forces the axis limits (as explained in this post: <a href="https://stackoverflow.com/questions/11272349/igraph-axes-xlim-ylim-plot-incorrectly">igraph axes xlim ylim plot incorrectly</a>). This produces the following plot:</p>
  
  <p><img src="https://i.stack.imgur.com/BUcUe.png" alt="enter image description here"></p>
  
  <p>I have tried initializing the plot extent before plotting the SpatialLinesDataFrame as shown below:</p>
  
  <pre><code>mapExtentPr &lt;- rbind(c(-1700000,-4000000), c(1700000,800000))
  plot(mapExtentPr, pch=NA)
  plot(ds, xlim=c(-1700000,1700000), ylim=c(-4000000,800000), axes=T, asp = 1, add=TRUE)
  </code></pre>
  
  <p>This sets the right limits but does not maintain the aspect ratio.
  I have also tried using the <code>clip()</code> function which had no effect.</p>
  
  <p>Is there a way to set the plot limits exactly while maintaining an aspect ratio of 1 (without using <code>ggplot</code> or <code>spplot</code>)?</p>
  
  <p>Note: I have checked this answer already: <a href="https://stackoverflow.com/questions/10450233/is-it-possible-to-change-the-ylim-and-xlim-when-the-plot-has-already-been-drawn">Is it possible to change the ylim and xlim when the plot has already been drawn?</a></p>