【发布时间】:2016-06-01 08:48:10
【问题描述】:
In this diagram, the main information (most nodes) is on the extreme left side.
我想让树状图易于阅读,因此边缘应该成比例地长。要使用的任何具体参数还是只是数据的问题?
【问题讨论】:
标签: r dendrogram ggdendro
In this diagram, the main information (most nodes) is on the extreme left side.
我想让树状图易于阅读,因此边缘应该成比例地长。要使用的任何具体参数还是只是数据的问题?
【问题讨论】:
标签: r dendrogram ggdendro
包ape 有一个选项可以绘制没有边长的树(或树状图)。
library(ape)
# calculate dendrogram from sample data
data(carnivora)
tr <- hclust(dist(carnivora[1:20,6:15]))
# convert dendrogram from class 'hclust' to 'phylo'
tr <- as.phylo(tr)
# plot, use par(mfrow=c(1,3)) to display side by side
plot(tr)
plot(tr, use.edge.length = FALSE)
plot(tr, use.edge.length = FALSE, node.depth = 2)
这会调用plot.phylo 函数,使您能够操纵树状图的外观。为了提高标签的易读性,您可能需要修改 plot 中影响字体大小 (cex = 0.7) 或标签偏移量 (label.offset = 0.5) 的设置。
【讨论】: