[R-sig-Geo] drawing order in spplot, sp.layout

Edzer Pebesma e.pebesma at gmail.com
Thu Dec 24 16:36:57 CET 2009



Patrick Giraudoux wrote:
> Dear listers,
>
> I am messing with spplot trying to get layers in the right order. 
> Basically I want a SpatialGridDataframe overlapped with a 
> SpatialPolygons object (actually a SpatialPolygonsDataFrame object). 
> The the data attribute of the SpatialGridDataFrame has 13 columns (12 
> months + the annual average of temperature). So, I expect 13 lattices 
> panels corresponding to each.
>
> This gives:
>
> addCh<-list("sp.polygons",chinaUTM47,border="grey50")
Patrick, I believe there's the option

addCh<-list("sp.polygons",chinaUTM47,col="grey50", first = FALSE)

that solves this. I can't find it really in the documentation, so 
something's missing there for sure. Use col instead of border.
--
Edzer
> spplot(ChinaTempTT,col.regions=mypal,sp.layout=addCh,as.table=T)
>
> Unfortunately, in each panel:
>
> - the polygons are drawn first and then are covered by the the grid 
> (the reverse of what I want to). Thus polygons are invisible.
> - the argument border="grey50" does not seems to used
>
> Any hint ?
>
> 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.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list