Re: [R-sig-phylo] Adding a custom legend underneath a phylo plot with coloured tips

2016-11-18 Thread Liam J. Revell
Hi Gabriel. For future reference, phytools has a couple of functions that could be useful. add.simmap.legend (e.g., http://www.phytools.org/blog/18Nov16-post.png), used on my blog here: http://blog.phytools.org/2016/11/updates-to-permit-user-control-of-line.html and add.color.bar (e.g.,

Re: [R-sig-phylo] Adding a custom legend underneath a phylo plot with coloured tips

2016-11-18 Thread Gabriel Yedid
This is what finally worked for me for setting up the plot with the legend how I wanted: (result is in attached PDF) Perhaps some of you will find it useful for your own work... #Zeileis et al.'s function for drawing palettes pal <- function(col, border = "light gray", ...) { n <- length(col)

Re: [R-sig-phylo] Adding a custom legend underneath a phylo plot with coloured tips

2016-10-27 Thread Liam J. Revell
Hi Gabriel. I recommend add.simmap.legend in phytools. For this, though, I would not use par(mfrow) to split the window into multiple plotting devices, but rather xlim or ylim in plotTree (or analogous arguments in plot.phylo) to resize the plot area to accommodate the legend. You should