Dear list members, I have been using R to create a heatmap where my data has continous variables from 0 to 100. When I create the heatmap, although the branches are correct, they do not order themselves so that the row with the most zeros is at one end and the row with the most 100s is at the other, which is what I would like them to do, so as to create a colour gradient down the graphic. I have tried to use reorderfun to fix this, and although it makes some change, the heatmap still does not look how I want.
Can you help? I have been using: tmp <-read.table("Heat.txt",row.names=1,header=T) mydata <- data.matrix(tmp) rc <- rainbow(nrow(mydata),start=0, end=1) cc <- rainbow(ncol(mydata), start=0, end=1) hv <- heatmap(mydata, col = cm.colors(256), scale="column", RowSideColors = rc, ColSideColors = cc, margin=c(5,10), xlab = "Gene", ylab= "Species", main = "Heatmap", reorderfun = function(mydata,w) reorder(mydata,0.0:100.0), Colv=NULL, Rowv=T) Thnak you, Fearon Cassidy Department of Zoology Trinity College Dublin [[alternative HTML version deleted]] ______________________________________________ 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.