[R-sig-Geo] Using ggplot2 to plot a shapefile

Zev Ross zev at zevross.com
Tue Mar 2 18:07:26 CET 2010


Hi All,

I'm using the ggplot2 library to make some plots and I'm wondering how I 
could plot a shapefile along with my points

# I use this to plot my points
p<-ggplot(elev,aes(X, Y))+geom_point(aes(color=Elev, size=Elev))

# here I read in the county shapefile
counties<-readShapePoly("X:/counties_teale.shp")

# how do I add this to my plot would I use geom_polygon somehow?

Thank you, Zev

-- 
Zev Ross
ZevRoss Spatial Analysis
120 N Aurora, Suite 3A
Ithaca, NY 14850
607-277-0004 (phone)
866-877-3690 (fax, toll-free)
zev at zevross.com



More information about the R-sig-Geo mailing list