UPDATE: Greg jordan has a much more elegant way of plotting trees with ggplot2. See his links in the comments below.
I wrote a simple function for plotting a phylogeny in ggplot2. However, it only handles a 3 species tree right now, as I haven't figured out how to generalize the approach to N species.
Any ideas on how to improve this?
I implemented a ggplot-based tree plot function for the phylosim package: http://cran.r-project.org/web/packages/phylosim/vignettes/PhyloSim.pdf
ReplyDeleteThe examples don't show off the tree plotting so much, but here's an example of a plot that colors and scales lines using NHX annotations: http://www.ebi.ac.uk/~greg/scratch/NKX2-3_plot_tree.pdf
Right now the plotting functions aren't too well documented, but feel free to get in touch if you'd like to see more.