R heatmaps - non-text labels?
- by Carl
I am making a heatmap plot; currently the axes are labeled by index number.
However, the index number corresponds to a series of 1/0s, which my group typically represents with a row of filled(1) or unfilled(0) boxes (think chessboard, though not strictly alternating colors). I'd like to use that representation instead of the index numbers.
Any suggestions? I've considered simply making the labels as a plot, and positioning that adjacent to the heatmap, but I'm not finding a convenient way to do that either.
I will also appreciate answers that are more generically applicable.
edit - current code:
map <- data.matrix(read.csv("./heatmap.out", header=F, sep=" "))
# ...some clean-up
p<-heatmap(map, Rowv=NA, Colv=NA, col=grey(10:0 / 10))
this simply labels the heatmap rows/cols by index number. heatmap.out is raw numeric data.