[R-sig-Geo] spplot question

Eric Morway emorway at engr.colostate.edu
Fri Sep 11 18:35:52 CEST 2009


Hello,

I've been working on an image created with spplot and with help have 
gotten it very close to the final product.  One final modification I 
would like to make involves filling in grid cells with values less than 
the minimum value on the legend with the color corresponding to the 
bottom of the legend.  In the attached figure, the minimum legend value 
is 10, but there a few spots with values as low as 0.01. These cells are 
currently blank/white.  I would like to avoid including this value on my 
legend due to the color spread on the plot becoming homologous, that is, 
I would like the color spread to be maximized between 10-1000.  Were I 
to go from 0.01-1000, the range I'm most interested in (10-1000) would 
be confined to a more narrow range of the legend.  I have played around 
with trying to specify a different number of cuts for the legend vs plot 
area, but this causes a disconnect between the legend and the colors 
displayed for the different grid cells.  The spplot line looks like this 
(image attached):

pts<-list("sp.points",K.dat,pch=3,col="black",labels=as.character(K.dat$Kh))
cuts<-c(10,20,30,40,50,60,70,80,90,100,200,300,400,500,600,700,800,900,1000)
spplot(lzm.krige.dir["var1.pred"],at=cuts,colorkey=list(at=log10(cuts),labels=as.character(cuts)),scales=list(draw=TRUE), 
   
xlab="Easting",ylab="Northing",key.space="right",cex=1.1,col.regions=terrain.colors(22),main="Hydraulic 
Conductivity of Layer 2",sp.layout=list(pts))

Respectfully,
Eric Morway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image3.png
Type: image/png
Size: 16518 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090911/6f77bf37/attachment.png>


More information about the R-sig-Geo mailing list