Skip to content
Prev 106675 / 398525 Next

counties in different colours using map()

Tord Sn?ll wrote:
Hi Tord,
I don't know if this matches the color to the state as I couldn't get 
your "unix" function to work, but it does what I think you want.

library(maps)
map("usa")
data(votes.repub)
library(plotrix)
state.col<-color.scale(votes.repub[,30],c(0,1),0,c(1,0))
map("state",fill=TRUE,col=state.col)

Jim