Skip to content

zlim and plot in raster

3 messages · Kranstauber, Bart, Alexandre Castagna, Robert J. Hijmans

#
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
2 days later