使用 dendextend 库时,有没有办法控制树状图的大小或整体分布?我正在使用 dendextend 库来为我的树状图的标签着色。当我在不使用dendextend 库的情况下绘制集群时,该图看起来不错。我猜dendextend 的默认设置与常规绘图不同。
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.