问题 The following code generates a simple hierarchical cluster dendrogram with 10 leaf nodes: import scipy import scipy.cluster.hierarchy as sch import matplotlib.pylab as plt X = scipy.randn(10,2) d = sch.distance.pdist(X) Z= sch.linkage(d,method='complete') P =sch.dendrogram(Z) plt.show() I generate three flat clusters like so: T = sch.fcluster(Z, 3, 'maxclust') # array([3, 1, 1, 2, 2, 2, 2, 2, 1, 2]) However, I'd like to see the cluster labels 1,2,3 on the dendrogram. It's easy for me to