Normally when you call maps::map()
it automatically plots the map during the function call, but you can pass plot=F
to prevent that. At the same time, you can store the return value from the call in a variable, which will contain the x and y coordinates of the contours of the requested map. You can then use some trigonometry to rotate all the x and y coordinates about a center point, and finally plot the rotated points manually using base R plotting functions.
library('maps');
library('mapproj');
library('mapdata');
xlon = seq(-1,7,0.01);
xlat = seq(34,42,0.01);
md <- map('worldHires',xlim=range(xlon),ylim=range(xlat),mar=c(0,0,0,0),plot=F);
md2 <- md;
rot <- -30*pi/180;
about <- c(2,37);
newangles <- atan2(md$y-about[2],md$x-about[1])+rot;
mags <- sqrt((md$x-about[1])^2+(md$y-about[2])^2);
md2$x <- about[1]+cos(newangles)*mags;
md2$y <- about[2]+sin(newangles)*mags;
par(mar=c(0,0,0,0)); plot(md2,type='l',xlim=range(xlon),ylim=range(xlat),axes=F,ann=F);
text(about[1],about[2],labels='point1',pos=4);
points(about[1],about[2]);
