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/27 evgeny55 <evgen...@yahoo.com>: > > 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 would work as well > > thanks > -- > View this message in context: > http://n4.nabble.com/color-matrix-tp1312078p1312078.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org 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. > ______________________________________________ R-help@r-project.org 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.