That's really cool, Liam. Would it also be possible for one to do multiple such error bars per node, for plotting ASRs for multiple traits? -Dave
On Mon, Feb 27, 2017 at 12:13 PM, Liam J. Revell <liam.rev...@umb.edu> wrote: > Hi Kevin. > > This is not automatic - but it is indeed fairly easy to do using phytools. > To be honest, I thought this would look terrible - but it actually looks > much better than I expected, at least for a relatively small tree. I have > posted a demo to my blog here: > http://blog.phytools.org/2017/02/adding-colorful-error-bars-to-internal.html. > > All the best, Liam > > Liam J. Revell, Associate 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 2/27/2017 11:16 AM, Arbuckle, Kevin wrote: >> >> Hi all, >> >> I was wondering about plotting the output of an ancestral state >> 'reconstruction' of a continuous trait while incorporating at least some of >> the uncertainty around the estimates. >> >> One approach I thought of was to map the ASR onto a tree in a standard >> way, then at each node have essentially a mini-legend that is of a length >> reflecting the width of the confidence interval of the estimate at that >> node, and is coloured on the same colour-scale as the overall tree legend. >> For instance, if the colour scheme for the tree goes from blue through >> yellow to red as the value increases, then a node with a relatively precise >> and high estimate will have a short bar only ranging through different >> shades of red, whereas a highly uncertain low estimate will have a wider bar >> coloured from (say) dark blue to orange/light red. I hope that description >> makes sense. >> >> I was wondering if anyone is aware of a function that already implements >> such an approach, otherwise I'll try to put one together myself. I am aware >> of phytool's fancyTree(type="phenogram95") as a way of incorporating >> uncertainty into a plotted ASR for continuous traits. However, this often >> results in difficulty in distinguishing different nodes where estimates are >> similar and also does not lend itself easily to, for instance, plotting pie >> charts representing discrete trait ASRs onto a tree mapped with a continuous >> trait. Hence I can imagine a more general approach as above but don't want >> to duplicate effort if a function already exists (and also if others feel >> this is a useful idea it can be added to existing packages If I share it as >> above). >> >> Best wishes, >> Kev >> _______________________________________________ >> 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/ >> > > _______________________________________________ > 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/ -- David W. Bapst, PhD Adjunct Asst. Professor, Geology and Geol. Eng. South Dakota School of Mines and Technology 501 E. St. Joseph Rapid City, SD 57701 http://webpages.sdsmt.edu/~dbapst/ http://cran.r-project.org/web/packages/paleotree/index.html _______________________________________________ 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/