简体   繁体   中英

Adding node labels to dendrogram plot in dendextend

I have a dendrogram with leaf and node labels (class=phylo, read in using read.tree). After converting this to dendrogram class the node labels are not there anymore. However, I would like to plot the dendrogram by showing labels on top of some nodes (ie in the form NODE_1 etc. on top of the selected clusters).

Does anyone know how can I get node labels to dendrogram class and add them to the plot? Something similar like this, but instead of numbers there are id-s or labels and only some selection of nodes have the labels.

在此处输入图片说明

I would convert your dendrogram to phylo class with as.phylo . When plotting you can do plot(phylo, show.node.label = TRUE) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM