[R] defining color sequence in image()

From: Milton Cezar Ribeiro <milton_ruser_at_yahoo.com.br>
Date: Tue 26 Dec 2006 - 00:03:44 GMT

Dear All,    

  How can I define a color sequence for each image value? I have several images with values varying from 1 to 5, and I would like to assing a fixed color for each value (green for 1, yellow for 2...). I used somethink like:    

> image(img,col=c("green","yellow",...))

  but unfortunately whem I have absent values, the color that I defined for each values change.    

  Thanks a lot,    


  PS : Merry Christmas!!!

        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Dec 26 11:06:56 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 26 Dec 2006 - 09:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.