plot order in spplot with sp.layout
Hello, I find useful the layer and layer_ mechanism of latticeExtra: p <- spplot(meuse.grid) p + layer(sp.polygons(meuse.riv)) p + layer_(sp.polygons(meuse.riv)) Cheers, Oscar. ------------------- Oscar Perpi??n Lamigueiro Dpto. Ingenier?a El?ctrica EUITI-UPM http://procomun.wordpress.com -----------------------------------------
Hi,
An alternative approach is to use a custom panel function, which is
even more flexible that the solution Edzer suggested. To add polygons
and points to a grid map using a custom panel function:
spplot(grid_object, "layer_to_plot",
panel = function(...) {
panel.gridplot(...)
sp.polygons(polygon_object)
sp.points(point_object)
})
see also the R wiki article on spatial data visualization [1].
cheers,
Paul
[1]
http://rwiki.sciviews.org/doku.php?id=tips:spatial-data:spatial_data_visualization