1

I have a dataset where i am trying to cluster a column with 986 observations with the below code.

PremiumPrice_Sclaed <- scale(data$PremiumPrice)
plot(PremiumPrice_Sclaed)

d <- dist(PremiumPrice_Sclaed) #scale for cluster
fit.average <- hclust(d, method="average")
plot(fit.average, cex = .1 ,main="Average Linkage Clustering")

can someone please tell me how to fix the below dendogram?

enter image description here

Dave2e
  • 22,192
  • 18
  • 42
  • 50
Gordon O
  • 11
  • 1
  • 2
    You have 1000 items along the x-axis, that is a lot of information to display in a small area. What is an acceptable fix? Breaking up the dendrogram into multiple parts for better visibility? – Dave2e Dec 24 '21 at 14:28

1 Answers1

1

You probably want to remove the labels.

hc <- hclust(dist(rbind(USArrests, USArrests, USArrests)), "ave")

par(mfrow=c(1, 2))
plot(hc, hang=-1, sub='w/ labels')
plot(hc, hang=-1, labels=FALSE, sub='w/o labels')

enter image description here

jay.sf
  • 60,139
  • 8
  • 53
  • 110