[R-sig-Geo] plotting polygons of one shapefile in different colors?

cyndy-jer cyndyh at nmsu.edu
Thu Sep 26 18:04:09 CEST 2013

Hi folks -

Pardon some real rank newbie questions; I am very well versed in using
ArcGIS but something of a newbie to R, and just starting out doing GIS in R.  

I've installed sp, rgdal, and maptools, and now I'm trying to get some
mapping done!  

I've been able to load a type of shapefile I am currently in need of working
with.  It is a set of polygons, that are grouped into different strata that
may or may not be contiguous.  There is a field in the shapefile that
denotes which polygons are grouped together.  I hope it is clear what I

I can readily plot the entire polygon shapefile; what I have not been able
to work out is, how to access the field in the shapefile that groups them,
and plot each polygon group in a different color.   In ArcGIS, my shapefile
has a field named 'n' that represents the grouping.  How would I go about
making a map that shows my polygons grouped by 'n' in different colors? 

Thanks in advance for any pointers!

View this message in context: http://r-sig-geo.2731867.n2.nabble.com/plotting-polygons-of-one-shapefile-in-different-colors-tp7584720.html
Sent from the R-sig-geo mailing list archive at Nabble.com.

More information about the R-sig-Geo mailing list