On 02/03/2011 10:10 AM, Ghislain Vieilledent wrote: > Dear list, > > I encountered a problem using function image() and argument breaks on a > SpatialGridDataFrame object (package sp version 0.9-76, R version 2.12.1 > (2010-12-16) on Ubuntu 10.04). > > I had to use function as.image.SpatialGridDataFrame before to obtain the > correct colored graphic: > > # Doesn't work: > image(SDAzD.As.A2a.2080,breaks=c(seq(0,0.5,0.1),1),col=c(grey(seq(0.9,0.5,-0.1)),"dark > green")) > > # Works: > xyz <- as.image.SpatialGridDataFrame(SDAzD.As.A2a.2080) > image(xyz,breaks=c(seq(0,0.5,0.1),1),col=c(grey(seq(0.9,0.5,-0.1)),"dark > green")) > > Is this a normal behavior ?
Yes, as the image method is called with different objects, try class(xyz) class(SDAzD.As.A2a.2080) to find out. You get the respective help pages by ?image ?image.SpatialGridDataFrame > > Best regards, > > Ghislain > -- 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.pebe...@wwu.de _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo