[R-sig-Geo] can spplot add features ?

Edzer Pebesma edzer.pebesma at uni-muenster.de
Tue Jul 7 08:27:50 CEST 2009



Patrick Giraudoux wrote:
> Dear listers,
>
> I would like to add the border of  a country (SpatialPolygons object
> called ChinaBorder) in a spplot built as following:
>
> mypal<-colorRampPalette(c("white", "cyan",
> "blue","green","yellow","red"))
> statSpat<-SpatialPointsDataFrame(chinagrid,data.frame(n=z))
> gridded(statSpat)<-TRUE
> spplot(statSpat,col.regions=mypal)
>
> I cannot managed to overlap ChinaBorder to statSpat with the 'panel'
> argument of spplot.
>
> Any idea about how to proceed ?
Patrick, you might want to try

spplot(statSpat, col.regions = mypal, sp.layout = list("sp.polygons",
ChinaBorder))
>
> Patrick
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de/
http://www.springer.com/978-0-387-78170-9 e.pebesma at wwu.de



More information about the R-sig-Geo mailing list