[R] add map to plot
Thomas Steiner
finbref.2006 at gmail.com
Sun Jun 10 22:44:23 CEST 2012
Hi,
I'd like to add a world map (equirectangular projection) in the
background of a normal R-plot and the world map should be shifted (the
center of the map should be c(163.87,23.581) where the center of the
plot is c(180,35)):
plot(c(0,360),c(0,70),type="n",main="My worldmap")
m=map("world", proj="rectangular", parameters=0, col="bisque",
fill=TRUE, resolution=0, lty=0,add=TRUE)
abline(v=180,h=47.162,col="red")
points(mapproject(list(y=0,x=16.13)),col="coral",pch="x",cex=2)
text(180,47.162,"Coordinates: 0°N 16.130°E")
adding a ",oritentation=c(163.87,23.581,0)" to the map() does not
change anything. Why? Could be that something with "parameters=90" is
wrong?
Thanks for hints,
Thomas
More information about the R-help
mailing list