[R-sig-Geo] plot points in grid-plot with sp.layout
Tom Gottfried
tom.gottfried at wzw.tum.de
Wed Oct 14 18:20:31 CEST 2009
Hi list,
the last plot in the following code ends up with error messages in the plot:
data(meuse.grid)
data(meuse)
coordinates(meuse.grid) <- ~x+y
coordinates(meuse) <- ~x+y
meuse.grid <- as(as(meuse.grid, "SpatialPixelsDataFrame"),
"SpatialGridDataFrame")
spplot(meuse) # works
spplot(meuse, sp.layout=list(sp.points,
meuse, col="red")) # works
spplot(meuse.grid) # works
spplot(meuse.grid, sp.layout=list(sp.points, meuse)) # does not work
What can I do to make the points being plotted on top of the grid?
Thanks in advance!!
Tom
More information about the R-sig-Geo
mailing list