I'm using R with the maps/mapproject/maptools packages to plot some maps and noticed a behavior which seems counter-intuitive to me and actually limits what I can do.
Drawing a map of Europe (with the limits taken from the ETRS89 / ETRS-LCC, so without Iceland and also clipped in the East) without specifying any projection:
library(maps)
map("world",xlim=c(-10.67,34.5),ylim=c(31.55,71.05), interior = T)
The result is as expected, the limits are being used and the resulting map follows them.
The projection used by default by maps is, as per the help:
The default is to use a rectangular projection with the aspect ratio
chosen so that longitude and latitude scales are equivalent at the
center of the picture.
This is not a good projection for my needs, I will use an LCC projection with the parallels as indicated in the above spatialreference.org link:
library(maps)
map("world",xlim=c(-10.67,34.5),ylim=c(31.55,71.05), interior = T, projection="lambert", parameters = c(45,65))
box()
The result is unexpected in that it includes a much bigger area (going very far north and including Russia), essentially making the map unusable.
What's stranger is that when using a grid the original limits are clearly considered:
library(maps)
library(mapproj)
map("world",xlim=c(-10.67,34.5),ylim=c(31.55,71.05), interior = T, projection="lambert", parameters = c(45,65))
map.grid(cex=0.1 , col="grey30")
box()
What I would like to have (and what I assumed would be the result of the above code) was a rectangular crop that included the limits I specified (adjusted due to the projection used so having more area than the rectangular one above would be expected). Additionally there is a white space around the map and the border which is present whenever one uses a projection with map().
The question is: is there a way to have this result when using map/mapproj/maptools? I tried to artificially change xlim/ylim without good results since it seems to work in big intervals (i.e. changing them doesn't produce an effect until suddenly half of Europe disappears with the next decrement).