Color in the leafs of a dendrogram?
0
0
Entering edit mode
@johan-lindberg-815
Last seen 10.2 years ago
Hmm... I cannot find any way of coloring the leafs after reading help(dendrogram) or looking at the examples. Ok, you can put in different symbols (and put color to them) for the different levels but that was not what I wanted to do. I want to color the leafs of the dendrogram after the different groups that I have in my data. Then it is really easy to see which goes where and which deviate. Currently I am doing this afterwards by saving the image as a postscript file and altering it. My situation is like this. I have a matrix of expressionvalues. There are 3 patients with 3 hybridizations each. When I plot the matrix with the help of " sampdist <- dist(t(matrix), method="euclidean") sclus <- hclust(sampdist, method="average") plot(sclus, cex=0.7) " then my colnames(matrix) will be plotted as leafs. It is those that I want to give different colors. How do I do this? Best regards // Johan Lindberg -----Original Message----- From: Martin Maechler [mailto:maechler@stat.math.ethz.ch] Sent: Thursday, October 28, 2004 10:34 AM To: Johan Lindberg Cc: bioconductor@stat.math.ethz.ch Subject: Re: [BioC] Color in the lefs of a dendrogram? Y >>>>> "Johan" == Johan Lindberg <johanl@biotech.kth.se> >>>>> on Wed, 27 Oct 2004 10:14:57 +0200 writes: Johan> Hi all. I have a question of how to put color in a plot of a Johan> hierarchical clustering that I have done with 24 microarrays in an Johan> experiment. The basic code that I use to plot: Johan> sampdist <- dist(t(Mmatrix), method="euclidean") Johan> sclus <- hclust(sampdist, method="average") Johan> plot(sclus, cex=0.7) Use dclus <- as.dendrogram(sclus) and -- after reading help(dendrogram) and maybe executing example(dendrogram) use plot(dclus, ......................) Martin Maechler, ETH Zurich
Clustering Clustering • 807 views
ADD COMMENT

Login before adding your answer.

Traffic: 585 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6