-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting Problem of Evolutionary Leaf Node Labels//咨询进化树叶节点的排序问题 #617
Comments
With library(ggtree)
# example tree
set.seed(0)
tree <- rtree(5)
# ggtree
ggtree(tree) + geom_tiplab()
# ggdensitree
ggdensitree(list(tree), layout = 'rectangular') + geom_tiplab()
# tip.order can be used to reorder tips
ggdensitree(list(tree), layout = 'rectangular', tip.order = paste0("t", 1:5)) + geom_tiplab()
# you can also put a more reasonable order
ggdensitree(list(tree), layout = 'rectangular', tip.order = c("t2", "t5", "t1", "t3", "t4")) + geom_tiplab() By default |
Thank you very much Can I ask one more question? Best wishes. |
1 similar comment
Thank you very much Can I ask one more question? Best wishes. |
Dear author
I have a simple question to consult, but it does confuse me.
When I use ggtree, the order of tree $tip. label is always the order in the imported evolutionary tree,
I discovered through reading page 128 of "R Practical" that ggtree provides a few functions for adjusting the structure called flip,
If you want to adjust the order of the evolutionary tree in the specified order, can you use ggtree?
In addition, I have found that the visualization results of the tree are not completely consistent with the order of the tree $tip. label. I would like to boldly ask what is the logic of this arrangement order?
If you could not hesitate to give me advice, I would be extremely grateful.
Wishing you a pleasant life and work
A new fan of Uncle Y
亲爱的作者
我有一个简单的问题想要咨询,但是这个确实使我感到困惑。
当我使用ggtree的时候,tree$tip.label的顺序永远是导入的进化树中的顺序,
我通过阅读《R实战》128页发现了ggtree提供了少部分调整结构的函数flip,
如果想要按照指定的顺序去调整进化树的顺序,用ggtree是否能做到?
另外我发现tree在可视化的结果中,并不完全与tree$tip.label的顺序一致,想斗胆请教一下这个排列顺序的逻辑是什么?
如能不吝赐教、当真万分感谢。
祝您生活工作愉快
Y叔的粉丝
The text was updated successfully, but these errors were encountered: