data=iris[,-5]dist.e=dist(data,method='euclidean')model1=hclust(dist.e,method='ward') #分3类result=cutree(model1,k=3)mds=cmdscale(dist.e,k=2,eig=T)x = mds$points[,1]y = mds$points[,2]library(ggplot2)p=ggplot(data.frame(x,y),aes(x,y))p+geom_point(size=3…