Re: [R] color matrix

2010-01-27 Thread baptiste auguie
Hi, It's easy with ggplot2, cols = matrix(c("#F7FBFF", "#DEEBF7", "#C6DBEF", "#9ECAE1", "#6BAED6", "#4292C6", "#2171B5", "#08519C" ,"#08306B"), ncol=3) library(ggplot2) m = melt(cols) qplot(factor(X1),factor(X2),data=m, fill=value, geom="tile") + scale_fill_identity() HTH, baptiste 2010/1/2

[R] color matrix

2010-01-27 Thread evgeny55
Hi, Is it possible to create a heatmap for say a 3x3 matrix of data where every color is pre-assigned? I can easily create a matrix of hex colors but when I try to use that matrix as the parameter for the 'col' option it doesn't work. If it's possible to just display a matrix of hex colors that w