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:
ds <- readOGR(dsn = path, layer = "10m_coastline_ps")
This creates a SpatialLinesDataFrame. Now when I plot this SpatialLinesDataFrame using the plot() function, I am unable to set the plot limits using the xlim and ylim parameters:
plot(ds, xlim=c(-1700000,1700000), ylim=c(-4000000,800000), axes=T)
The plot() function automatically sets the aspect ratio to 1 and forces the axis limits (as explained in this post: igraph axes xlim ylim plot incorrectly). This produces the following plot:

I have tried initializing the plot extent before plotting the SpatialLinesDataFrame as shown below:
mapExtentPr <- 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)
This sets the right limits but does not maintain the aspect ratio.
I have also tried using the clip() function which had no effect.
Is there a way to set the plot limits exactly while maintaining an aspect ratio of 1 (without using ggplot or spplot)?
Note: I have checked this answer already: Is it possible to change the ylim and xlim when the plot has already been drawn?

pty = "s"to either the fullplotcall from the first example, or theplot(mapExtentPr, pch=NA)call from the second example help? The point here is to maintain a square plotting region otherwise it is impossible to force 1asp = 1 and control the axis limits. Even when the plotting region is square, you won't be able to force it perfectly. The other option is to rescale the plotting window until you get roughly the limits you want. - Gavin Simpsonpty = "s"doesn't do the job since I will be needing a non square region. Rescaling the plotting window works fine, but I was looking for an automatic procedure. I guess I will probably end up doing this withggplotorspplot... - jatobat