[R] can I plot a matrix of colors?

dxc13 dxc13 at health.state.ny.us
Thu May 14 17:03:23 CEST 2009


Hi all,

I have a 36x14 matrix of hexadecimal coded colors (see attached file) that
was created with the following code:
cellcol[is.na(cellcol)] <- "#FFFF00"
#Aliceblue
cellcol[cellcol < 5] <- "#F0F8FF"
#Skyblue1
cellcol[cellcol >= 5 & cellcol < 20] <- "#87CEFF"
#Blue
cellcol[cellcol >= 20 & cellcol < 35] <- "#0000FF"
#Green3
cellcol[cellcol >= 35 & cellcol < 50] <- "#00CD00"
#Yellow2
cellcol[cellcol >= 50 & cellcol < 60] <- "#EEEE00"
#Orange2
cellcol[cellcol >= 60 & cellcol < 75] <- "#EE9A00"
#Red
cellcol[cellcol >= 75 & cellcol < 90] <- "#EE0000"    
#Firebrick
cellcol[cellcol >= 90] <- "#B22222"	

My question is, can I plot this matrix using image() or do the colors need
to be in a different format?
Thank you.

dxc13
http://www.nabble.com/file/p23542487/colors.txt colors.txt 
-- 
View this message in context: http://www.nabble.com/can-I-plot-a-matrix-of-colors--tp23542487p23542487.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list