-
Notifications
You must be signed in to change notification settings - Fork 174
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
Feature request: Density trees #134
Comments
I've implemented a prototype for this in my fork: brj1/ggtree You can make DensiTree like plots with my fork of ggtree with library(ape)
library(ggtree)
tree = read.tree("all_par.tree") #A file with many trees
p <- ggdensitree(tree, layout="slanted", branch.length='none', color="lightblue", alpha=.3,) + geom_tiplab(cex=1)
p EDIT: Upon @GuangchuangYu 's suggestion I have renamed ggmultitree to ggdensitree to avoid confusion with the multiPhylo class. |
any progress and plan for PR @brj1 ? |
I don't think I have anything to add to ggdensitree. However, I have hesitated adding ggdensitree as a PR for several reasons:
The main features that ggdensitree adds are the following:
To my knowledge multiPhylo objects are plotted with the roots aligned and the tips (taxa) ordered individually so that the tips at the same y values may not correspond to the same taxon in different trees. These were the main reasons why I wrote the ggdensitree function in the first place. Again, it may be better to just add this functionality into preexisting ggtree functions. |
Hi!
I'm trying to emulate DensiTree plots using ggtree. It is clear that ggtree can't generate trees like this at the moment: https://pbs.twimg.com/media/CNn5DgkWIAAQxmC.jpg .
I tried plotting all the trees at the same time but the outcome was a tree in which all the tips were aligned at different distances.
library(ape) library(ggtree) tree = read.tree("all_par.tree") #A file with many trees p <- ggtree(tree, layout="slanted", branch.length='none', color="lightblue", alpha=.3,) + geom_tiplab(cex=1) p
Could you try to implement this in the future? Thanks
The text was updated successfully, but these errors were encountered: