# maps in R by Ian Taylor # goes with the file Rmap_boundaries.r # load necessary packages into R library(maps) library(mapdata) ################### ### smaller map ################### # make initial map windows(5,5) map('worldHires', xlim=c(-128,-121),ylim=c(46,50), border=0, fill=TRUE,col='navajowhite3') box();axis(1, seq(-128,-120,2,),paste(seq(128,120,-2),'°W', sep=''));axis(2, seq(45,50,1),paste(seq(45,50,1),'°N', sep='')) # add color blocks areacol = c('orange','red','purple','blue','springgreen') areacol2 = c('#FFBB66','#FF8888','#FF66FF','#8888FF','springgreen') polygon(CANboundary,col=areacol[4]) polygon(GSboundary,col=areacol[3]) polygon(USboundary,col=areacol[1]) polygon(PSboundary,col=areacol[2]) # put map on top map('worldHires', xlim=c(-128,-121),ylim=c(46,50), border=0, fill=TRUE,col='navajowhite3', add=T) lines(USboundary[1:31,],lty=1,lwd=3,col=1); box() ################### ### coastwide map intended to be doctored in photoshop (or GIMP) ################### # make initial map windows(4,7) map('worldHires', xlim=c(-135,-120),ylim=c(34,54), border=0, fill=TRUE,col='navajowhite3') #box();#axis(3, seq(-134,-122,4,),paste(seq(134,122,-4),'°W', sep=''));axis(4, seq(34,55,4),paste(seq(34,55,4),'°N', sep='')) # add color blocks areacol = c('orange','red','purple','blue','springgreen') areacol2 = c('#FFBB66','#FF8888','#FF66FF','#8888FF','springgreen') GS2 = rbind(GSboundary[1:17,],c(-128,50.6),c(-127,51.5),GSboundary[18:19,]) polygon(CANboundary,col=areacol[4]) polygon(NBCboundary,col=areacol[5]) polygon(GSboundary,col=areacol[3]) polygon(USboundary,col=areacol[1]) polygon(PSboundary,col=areacol[2]) # put map on top map('worldHires', xlim=c(-135,-120),ylim=c(34,54), border=0, fill=TRUE,col='navajowhite3', add=T) #box()