[R] Coloring Counties in a State Map

Ray Brownrigg Ray.Brownrigg at ecs.vuw.ac.nz
Tue Jul 31 03:03:56 CEST 2012


On 07/29/12 08:56, arcata wrote:
> I am mapping U.S. state counties in individual states maps, e.g. A map of
> Montana, with county lines. 
> How do I fill specific counties with a different color?
> 
Do you mean something like:
m <- map("county", "Montana")
map("county", m$names[c(1, 4)], fill=TRUE, col=c(3, 2), add=TRUE)

Ray



More information about the R-help mailing list