英文:
Change label size in plot.dendrogram
问题
我想要减小构成我的谱系图的文字的大小。
到目前为止,我的代码,但它不会减小文字的大小:
hc_sbd_1 <- tsclust(result3_2, type = "h", k= 10,
distance = "sbd",
control = hierarchical_control(method = "ward.D"))
hc_sbd_1 <- as.dendrogram(hc_sbd_1, cex = 0.2)
plot(hc_sbd_1)
这是我的谱系图。
英文:
I would like to reduce the size of the words that make up my dendrogram.
My code so far, but it doesn't reduce the size of the words:
hc_sbd_1 <- tsclust(result3_2, type = "h", k= 10,
distance = "sbd",
control = hierarchical_control(method = "ward.D"))
hc_sbd_1 <- as.dendrogram(hc_sbd_1, cex = 0.2)
plot(hc_sbd_1)
This is my dendrogram
答案1
得分: 1
你也可以使用dendextend R包来对输出进行精细控制。
例如,您可以使用as.dendrogram将hclust更改为dendrogram,然后使用dendextend中的set函数与"labels_cex"来更改标签的大小。
英文:
You can also use the dendextend R package to get a very refined control of the output.
E.g. you can change the hclust to dendrogram using as.dendrogram, and then use the set function (from dendextend) with the "labels_cex" to change the sizes of the labels.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论