[R-sig-Geo] Plotting points over a grid

B. Kranstauber B.Kranstauber at student.rug.nl
Sun Mar 23 02:57:50 CET 2008


Hi,

What I want to do is plot grid and plot points with Z 
values over them with spplot. I have a 
SpatialGridDataframe and a SpatialPointsDataframe. The 
closest i get  is:

> bla=list("sp.grid", a["var1.pred"])
> spplot(layer["AGOUTIS_DAY"], sp.layout=bla)

But then i get a completely black background. I was 
wondering if there is an other way to let the panel 
function sp.grid plot properly

I would have expected some syntax like the normal plot:

> spplot(a["var1.pred"])
> spplot(layer["AGOUTIS_DAY"], add=TRUE)

But that doesn't work either. What is the proper way to 
achieve this assuming it is possible

Thanks

Bart

PS I'm using the sp and gstat libraries with R 2.5.1 on 
Ubuntu linux




More information about the R-sig-Geo mailing list