[R-sig-Geo] zlim and plot in raster

Bart bart at njn.nl
Wed Jul 11 15:23:59 CEST 2012


hi

I just noted that zlim does adjust the legend but not the colors causing 
the legend to not match the colors.

example:

require(raster)
par(mfrow=1:2)
plot(a<-raster(matrix(runif(100),ncol=10)))
plot(a, zlim=c(0,10))

This is problem when one tries to create multiple plots with a matching 
legend.

I'm not sure if zlim is suppose to work but i think it should then issue 
a warning or error but not plot something with a wrong legend

Bart



More information about the R-sig-Geo mailing list