Skip to content
Prev 19969 / 29559 Next

contours in SpatialPixelsDataFrame

Hi,

spplot for SpatialPixelsDataFrame is built upon lattice::levelplot.
Thus, you can use most of its arguments in spplot. For your problem
you have to set "contour=TRUE" and "region=FALSE". Moreover, you can
customize the labels with (surprise!) "labels". This is documented in
the help page of lattice::panel.levelplot:

library(sp)
data(meuse.grid)
m <- SpatialPixelsDataFrame(points = meuse.grid[c("x", "y")],
    data = meuse.grid)

spplot(m["dist"],
       contour=TRUE, region=FALSE,
       labels=list(cex=0.6))

Best,

Oscar.
-----------------------------------------------------------------
Oscar Perpi??n Lamigueiro
Dpto. Ingenier?a El?ctrica (ETSIDI-UPM)
Grupo de Sistemas Fotovoltaicos (IES-UPM)
URL: http://oscarperpinan.github.io
Twitter: @oscarperpinan


2013/12/9 Agustin Lobo <alobolistas at gmail.com>: