Skip to content

spplot(), SpatialGridDataFrame

2 messages · Ingo Holz, Edzer Pebesma

#
Hi,

 I have a SpatialGridDataFrame and want to plot it with spplot().

 Is it possible to plot only the grids that have a special value (eg. 312)?

 If it is not possible to do this with spplot() how would it be done with plot()?

Thanks, Ingo
#
Ingo Holz wrote:
fullgrid(x) = FALSE
spplot(x[x$value == 312,"value"]

Note that if fullgrid(x) is TRUE, x[rows,cols] would select on 
rows/cols, not on attribute values.
I'd use image rather than plot; plot would use symbols instead of 
coloured squares.
--
Edzer