I'm trying to create a colored map that would show the number of students
per state.
My data frame consists of two columns - state and count.
I'm using the following code

library(maps)
map("usa")
library(plotrix)
state.col<-color.scale(gre$count,0,0,c(0,1))
 map("state",fill=TRUE,col=state.col)

I'm getting a map, but the values are not being mapped to correct states.
What do I need to do to fix that?

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to