r - 如何使用 R 包:dendextend 使树清晰显示
问题描述
我对 R 包有疑问:dendextend,我想清楚地表明这一点。我试图增加树的大小,但是叶子的长度增加了,节点仍然重叠。你知道什么选项可以在叶子的长度不太长的情况下使节点清晰显示吗?
t1 = read.dendrogram("F:/Neighbor-joining-tree.newick")
t1 = dendrapply(t1, function(x) {
if(is.leaf(x)) {
attr(x, "height") = 0
}
x
})
hist_minor <- Heatmap(minor,
column_title = "Statistics for a list of SNP.Frequency.minor",
column_title_gp = gpar(fontsize = 15, fontface = "bold"),
column_names_gp = gpar(fontsize = 10),
row_title = "Genome Postion(bp)",
row_title_gp = gpar(fontsize = 10),
name = "Variant.Frequency",
cluster_rows = FALSE,
cluster_columns = t1,
use_raster = TRUE,
raster_resize_mat = max,
right_annotation = ha,
show_row_names = FALSE,
col = cols,
column_dend_height= unit(3, "cm"),
#column_dend_height= unit(6, "cm")
border_gp = gpar(col = "black", lty = 2)
)
解决方案
推荐阅读
- java - java - 如何在嵌套的try catch和while循环中返回一个值
- java - 如何创建一个 ImmutableList 作为成员变量?
- reactjs - 尝试运行命令“npm start”时出错
- r - 具有向量条件的行总和
- c# - C 和 Arduino 中的有趣除法
- python - Python中os.environ的Shell等效性?
- python - 如果我有 Python3.4 中的代码并且我安装了最新的 Python3,我是否能够强制 IDLE 使用特定版本
- python - Python:从具有权重但不重复的列表中采样 N 个随机项目
- javascript - 使用 Javascript 对具有多个数字条目的表进行排序
- selenium - Perfecto Quantum Starter 模板 - 运行单个功能会导致“gherkin.parser.ParseError”