library(geomapdata)
data(coastmap)
plotGEOmap(coastmap , xaxs='i', yaxs='i')
#################### example:
coastmap$STROKES$col[coastmap$STROKES$code=="C" ] = rgb(1, .6, .6)
coastmap$STROKES$col[coastmap$STROKES$code=="c" ] = rgb(1, .9, .9)
coastmap$STROKES$col[coastmap$STROKES$code=="L" ] = rgb(.6, .6, 1)
plot(c(-30, 370), c(-85, 85), type='n', ann=FALSE, xaxs='i', yaxs='i')
plotGEOmap(coastmap , border='black' , add=TRUE)
title(xlab="Longitude", ylab="Latitude" )
grid()
box()
if (FALSE) {
### political map of the world
library(geomapdata)
plotGEOmap(coastmap , border='black' , add=FALSE, xaxs='i')
data(europe.bdy)
data(asia.bdy)
data(africa.bdy)
data(namer.bdy)
data(samer.bdy)
data(USAmap)
plotGEOmap(europe.bdy , add=TRUE)
plotGEOmap(asia.bdy , add=TRUE)
plotGEOmap(africa.bdy , add=TRUE)
plotGEOmap(namer.bdy , add=TRUE)
plotGEOmap(samer.bdy , add=TRUE)
plotGEOmap(USAmap , add=TRUE)
}
Run the code above in your browser using DataLab