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

Boris Leroy leroy.boris at gmail.com
Fri Dec 9 13:15:38 CET 2011


Dear Carsten,

Yes, it is known that zlim does not work properly and Robert Hijmans
is aware of that.
There will probably be a fix when possible!

All the best,

Boris

>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

--
Boris Leroy,
PhD Student,
Equipe Biodiversité et Gestion des Territoires,
Service du Patrimoine Naturel, MNHN
UMR 7204 CERSP, MNHN
Université de Rennes 1
Campus de Beaulieu, Bât. 25, 1er étage
35042 Rennes cedex

+33 (0) 2 23 23 68 05
+33 (0) 6 66 02 13 27



More information about the R-sig-Geo mailing list