Scatter-plot of data in which the cluster membership is coded by colors.
12 views (last 30 days)
Hello, I have created a dendrogram of my given data.
NumCluster = 1566;
dist = pdist(alldata, 'euclidean');
GroupsMatrix = linkage(dist, 'complete');
clust = cluster(GroupsMatrix, 'maxclust', NumCluster);
E = evalclusters(alldata,clust,'CalinskiHarabasz')
[H,T,perm] = dendrogram(GroupsMatrix, 1566, 'colorthreshold', 'default');
I want to create now a scatter-plot of the data in which the cluster membership is coded by colors. I have tried to implement it like this
gscatter (alldata(:,1),alldata(:,2), E.OptimalY,'rbgk','xod')
The error is now gone but all the scatter plot has the same color. How can I cluster the membership by different colors? And is my E chosen correctly for the number of clusters? For my E I have 1566 cluster. I did not know if this is okay.