[R-sig-Geo] zlim argument image() does not work
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Thu Dec 8 19:31:15 CET 2011
you didn't provide a reproducible example so I couldn't check, but have
you tried:
image(d1, "band100", zlim=c(0,1), useRasterImage = FALSE)
?
On 12/08/2011 06:49 PM, Carsten Neumann wrote:
> 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
>
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list