[R-sig-Geo] points on polygons

Thomas Lumley tlumley at u.washington.edu
Thu Oct 16 01:06:47 CEST 2008



I am trying to draw a US map with color-coded cities superimposed on 
color-coded states, showing survey results from the Behavioral Risk Factor 
Surveillance System.  You can see the sort of thing I'm trying to do at
http://apps.nccd.cdc.gov/gisbrfss/select_question.aspx (though I don't want all 
the text).

I have the spatial data, which are a shapefile of polygons for the states, and 
a shapefile of points for the cities.  I can read these in and use spplot() and 
the sp.layout option to get the points plotted on top of the polygons, but I 
can't figure out how to get a common set of colors used for both and and a 
color key drawn.

 	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle




More information about the R-sig-Geo mailing list