I am trying to cluster stock prices through time using hclust. To help with the interpretation of the output I would like to change the colour of the lines and the labels based on which sector a stock is in. Is it possible to customize a plot of the output of hclust in this way? Any help much appreciated Regards,> Tom Joy >[[alternative HTML version deleted]]
Martin Maechler
2004-Jul-01 14:22 UTC
[R] Customizing Cluster Analysis plots created with hclust
>>>>> "TomJ" == Joy, Tom <Tom.Joy at rmbinternational.com> >>>>> on Thu, 1 Jul 2004 11:20:33 +0100 writes:TomJ> I am trying to cluster stock prices through time using TomJ> hclust. To help with the interpretation of the output TomJ> I would like to change the colour of the lines and the TomJ> labels based on which sector a stock is in. Is it TomJ> possible to customize a plot of the output of hclust TomJ> in this way? It will be possible in the next versoin of R, and soon in "R-devel" -- by myhcl <- hclust(..........) myd <- as.dendrogram(myhcl) i.e. working with the dendrogram (and its plot method) rather than with the original "hclust" object and its much less flexible plotting method. Since the needed changes only need R-code changes, you can ask me "off line" and I'll send you the R code needed. Regards, Martin