#Plot the figure
plt.figure(1);
plt.clf();
plt.scatter(data[0,:],data[1,:]);
plt.xlabel('x');
plt.ylabel('y');
plt.title("Plot of all points from CURE dataset")
#Make dendrogram
Y=pdist(data,'euclid');
distances=squareform(Y);
c=linkage(data,method='single');
dendrogram(Z);
idx = fcluster(Z,5,'maxclust');
我想根据它们所属的群集为点着色,该怎么做?