[R] How to plot hierarchical clustering with different colors?

2011-11-15 Thread yzzhao
Dear experts, I would like to plot a hierarchical clustering of 300 items. I had a distance matrix with dimension of 300*300. The 300 items were from 7 groups which I would like to label with 7 different colours in the plot. >h<-hclust(as.dist(300_distance_matrix)) >plot(h,hang=-1,cex=0.5, col="

[R] A question:How to plot hierarchical clustering with different colors?

2011-11-15 Thread yzzhao
Dear experts, I would like to plot a hierarchical clustering of 300 items. I had a distance matrix with dimension of 300*300. The 300 items were from 7 groups which I would like to label with 7 different colours in the plot. h<-hclust(as.dist(300_distance_matrix)) plot(h,hang=-1,cex=0.5, c