0

I try to plot an hclust object. The plot looks ok but I would like to have a plot that doesn't go all the way down but stops at 5 cuts. I tried ylim but this doesn't change anything to the plot. My code is

library(datasets)
    data <- iris
dist <- dist(data, method= "euclidean")
hclust <- hclust(dist, method = "complete")
plot(hclust, ylim=4:8)
havaey
  • 9
  • 1
  • 5

1 Answers1

0

here you can find the answer to your question Plotting hclust only to the cut clusters, not every leaf

hclust <- cut(hclust, h = 100)
plot(hclust2$upper)
Carbo
  • 906
  • 5
  • 23