Re: [R] defining color sequence in image()

2006-12-26 Thread talepanda
one solution is: img1-matrix(1:5) img2-matrix(2:5) col-1:5 # col-c(green,yellow,...) image(img1,col=col[sort(unique(img1))]) image(img2,col=col[sort(unique(img2))]) On 12/26/06, Milton Cezar Ribeiro [EMAIL PROTECTED] wrote: Dear All, How can I define a color sequence for each image value? I

[R] defining color sequence in image()

2006-12-25 Thread Milton Cezar Ribeiro
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