[R-sig-Geo] zlim argument image() does not work

Carsten Neumann carstennh at aol.com
Thu Dec 8 18:49:12 CET 2011


Dear developers,

the zlim argument in image() or image.plot() can be used to change the 
scale of the colorlegend. But this has no influence on the image that is 
plotted. Typically z values (Pixels) allocated to image data should 
change colors regarding min and max placed on the legend. But the 
plotted colors remains the same independently from changing 
colorlegends. Is this a known bug or did I overlook a detail:
#############################################################################
sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] plotrix_3.3-1 fields_6.6.2  spam_0.27-0   rgdal_0.7-5   sp_0.9-91

loaded via a namespace (and not attached):
[1] grid_2.14.0    lattice_0.20-0
################################################################################
d1<-readGDAL('NMS1_blue_neu.img')

image.plot(d1,"band100",col=rainbow(200),zlim=c(0,200))
image.plot(d1,"band100",col=rainbow(200),zlim=c(0,1))

###means the legend is changing but the visualization of the images 
keeps the same and that is not a correct behavior###

The same behavior I could observe in Raster Objects!

Best regards

Carsten

-- 

Carsten Neumann
Telegrafenberg, A 17 01.13
14473 Potsdam
-------------------------------------------------------
Helmholtz Centre Potsdam
GFZ German Research Centre for Geosciences
Department 1 - Section 1.4 - Remote Sensing
-------------------------------------------------------
Tel.: +49 (0) 331 288 1766
e-mail: carstenn at gfz-potsdam.de



More information about the R-sig-Geo mailing list