Hi Martin.

The easiest way to do this is to create two side-by-side plots using par(mfcol=c(1,2)) and then put your tree & your boxplot in the two plots; however one has to be very careful in that case to ensure that the tips align to the correct boxes. I posted a demo of this to my blog. Let me know if this is helpful.

http://blog.phytools.org/2015/07/plotting-tree-with-adjacent-boxplot.html

All the best, Liam

Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 7/14/2015 6:44 AM, Martin Bulla wrote:
Dear list members,

I wonder whether anyone of you has a code for phyldataplot (or any other
plotting function) that allows for plotting the distributions of variable
(e.g., boxplots) next to the phylogeny giving something like:

​https://www.dropbox.com/s/2w48qceflgh1knc/boxplot_species_example2.png?dl=0

Your suggestions would help me a lot please.
Best wishes,
Martin


_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to