You can use abline, but heatmap rescales the x and y coordinates to min of 0, max of 1. You can use the max x and y values to find the desired location for the line.
Sarah On Sat, Mar 20, 2010 at 4:02 PM, Tim Smith <tim_smith_...@yahoo.com> wrote: > Hi, > > Is there a way I can draw an abline on a heatmap? I try the abline function, > but don't get the line. My sample code is: > mat <- matrix(sample(1:100,40),nrow=5) > heatmap(mat,col=greenred(75),trace="none", > dendrogram = "column",labCol = NULL) > abline(h=5,v=4) > > > thanks! > -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ 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.