[BioC] Question regarding the Heatmap function

Dongxiao Zhu zhud at umich.edu
Sat Feb 5 08:16:15 CET 2005


Hi all,

I wish to plot a Boolean matrix, in which "1" is represented by black and "0" is
represented by white. I first initialize a simple Boolean matrix, then issue the
following command:

> dd
  [,1] [,2] [,3] [,4] [,5]
a    1    1    1    1    1
b    1    1    1    1    0
c    0    0    0    0    0
> heatmap(dd, col = c(0,1), Rowv = NA, Colv = NA)

Presumably, the first row should be all black because all entries are "1", and
the third row should be all white cause all entries are "0". But the heatmap
shows both the first and third rows are white. When I use a large matrix with
more rows, all rows but the first one (supposed to be all black) are displayed
correctly. Can somebody help me out?

Thanks.

Dognxiao



More information about the Bioconductor mailing list