Skip to content
Prev 9422 / 29559 Next

spplot question

Eric, forgive me my rudeness to answer a private email to the list, but
for some reason I cannot find the original on the list, and also not in
its archives -- are you sure it arrived at r-sig-geo?

The question was why

spplot(lzm.krige.dir["var1.pred"], scales=list(draw=TRUE),
xlab="Easting",ylab="Northing",
cuts=seq(0.0,0.4,by=0.01),key.space="right",cex=1.1,col.regions=terrain.colors(41),

  main="Specific Yield Layer 1",sp.layout=list(pts))

results in two warnings and a useless plot.

The answer is that the spplot documentation is wrong. cuts is directly
passed to levelplot, and the documentation there states that it can only
contain the number of cuts, not more.

(this is not the case when using spplot on a SpatialPointsDataFrame
object, as in that case it is processed by the sp code.)

You can control the values where color changes with the "at" element of
a list passed to the colorkey argument, see ?levelplot after loading
library lattice.

Thanks for notifying, best regards,
On 09/28/2010 06:07 PM, Eric Morway wrote: