[R] Could anyone tell me how to plot a hierarchical clustering in a black-white color?
fhduan at gmail.com
Fri Nov 12 01:08:44 CET 2004
Thank you very much, Sundar. That's exactly what I want.
On Thu, 11 Nov 2004 15:19:19 -0800, Sundar Dorai-Raj
<sundar.dorai-raj at pdf.com> wrote:
> Frank Duan wrote:
> > Dear R people,
> > I am trying to do a hierarchical clustering to a matrix using
> > heatmap() function. But I like to have the plot to display in a
> > black-white manner? Could anyone tell me how to do that?
> > Thank you.
> > Frank
> Will ?gray do what you need?
> # from ?heatmap
> x <- as.matrix(mtcars)
> rc <- gray(seq(0, 1, len = nrow(x)))
> cc <- gray(seq(0, 1, len = ncol(x)))
> col <- gray(seq(0, 1, len = 256))
> hv <- heatmap(x, col = col, scale="column",
> RowSideColors = rc, ColSideColors = cc, margin=c(5,10),
> xlab = "specification variables", ylab= "Car Models",
> main = "heatmap(<Mtcars data>, ..., scale = \"column\")")
> This is for R-2.0.0 on Win2000.
More information about the R-help