1

Is there a way to control the size or the overall spread of the dendrogram when using the dendextend library? I am using the dendextend library in order to color the lables of my dendrogram. When I plot my cluster without using the dendextend library the plot looks decent. I guess the dendextend has different default setting than the regular plot.

library(dendextend)
pdf("Rplots.pdf", height=10, width=12)
par(cex=0.4)


clustering <- hclust(distance,method="ward.D2")

group <- data.frame(cutree(clustering,k=2))
clustering <- as.dendrogram(clustering,hang=0.2)

labels_colors(clustering) <- as.numeric(category)

labels(clustering) <- category

plot(clustering)

### Variable category is defined earlier in the code. 
pogibas
  • 27,303
  • 19
  • 84
  • 117
Mdhale
  • 815
  • 2
  • 15
  • 22
  • Hi, your example is not reproducible. That is, I can't run it in my R session and see what is not working for you. Please fix it so that we could help you get an answer for your question. – Tal Galili Sep 27 '17 at 02:04

0 Answers0