<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">
<br><span>Dear all,<br><br>I try to plot a raster map with a correct colour key using spplot. But the minimum seems to be smaller than the data minimum in the colour key.<br>
<br>I use the following code:<br><br>## Summary of raster map<br>
> summary(slope.grid)<br>Object of class SpatialGridDataFrame<br>Coordinates:<br>
min max<br>
x 76165.36 78140.36<br>y 65210.14 67560.14<br>Is projected: NA <br>proj4string : [NA]<br>
Grid attributes:<br> cellcentre.offset cellsize cells.dim<br>x 76167.86 5 395<br>
y 65212.64 5 470<br>
Data attributes:<br> Min. 1st Qu. Median Mean 3rd Qu. Max. NA's <br>
0.00 19.37 31.72 34.97 48.95 83.57 131421<br>
<br>## exact minimum<br>> min(slope.grid$band1, na.rm = T)<br>[1] 0.003956468<br>
<br>## Plot Slope grid and sampling scheme<br>l1 = list("sp.points", roeser.sp, pch = 21, lwd = 1, col = "black", fill = "white", cex = 0.8)<br>
l2 = list("SpatialPolygonsRescale", layout.north.arrow(), offset = c(76250,67200), scale = 300)<br>
l3 = list("SpatialPolygonsRescale", layout.scale.bar(), offset = c(77500,65300), scale = 500, fill=c("transparent","black"))<br>
l4 = list("sp.text", c(77500,65360), "0")<br>l5 = list("sp.text", c(77750,65360), "250")<br>
l6 = list("sp.text", c(78000,65360), "500m")<br>cuts = 199<br>at = c(0,10,20,30,40,50,60,70,80,90)<br>
spplot(slope.grid, zcol = "band1", col.regions = rainbow(200, start= 3/15, end = 1), cuts = cuts, pretty = F, sp.layout = list(l1, l2, l3,
l4, l5, l6), lty = 1, lwd = 0.1, scales = list(draw = TRUE),xlim = bbox(roeser.grid)[1,], ylim = bbox(roeser.grid)[2,], main = "Slope Map
with Sampling locations")<br><br>Somehow the colour key does not start with zero. Or better said, there
is a part of the colour ramp which signalises values below zero. The summary statistics show that the minimum value is 0.00</span>
<span><span>3956468.</span><br><br>You can find a screenshot here:<br><a style="font-size: small; display: block;" href="http://ubuntuone.com/1b6DAeKvoMTlvFZumWuIXz">
<font color="#0f7edb">http://ubuntuone.com/1b6DAeKvoMTlvFZumWuIXz</font>
</a><br>Any suggestions what I am doing wrong?<br><br>Thanks very much,<br>
Ulrich<br>______________________________________________<br><br>Ulrich Leopold<br>
<br>Senior Researcher in Geocomputation<br>Resource Centre for Environmental Technologies<br>
Public Research Centre Henri Tudor<br>6A, avenue des Hauts-Fourneaux<br>
L-4362 Esch-sur-Alzette<br>Luxembourg<br><br>tel: +352 425991 4618<br>fax: +352 425991 555<br>
mobile: +352 691 304813<br>email: ulrich.leopold@tudor.lu<br>http://www.tudor.lu</span>
</font>