Dear Liam, This is great, almost exactly what I needed. I will have to get our tree out and see if I can get it to work in R.
One question, is it possible to do a cumulative tree like this ( https://proopnarine.files.wordpress.com/2018/11/evolfaunas.png)? This is a good example of the graph I am trying to produce. The goal here is to show not only the diversity of each clade (which the current example on your blog does well) but also show that after a certain point all surviving lineages belong to these clades, and "basal" uncolored lineages are gone. Sincerely, Russell On Sat, Oct 28, 2023 at 9:09 PM Liam J. Revell <liam.rev...@umb.edu> wrote: > I like Will's suggestion. Unfortunately, *phytools::ltt.simmap* method in > *phytools* on CRAN does not support ultrametric trees. > > I have updated it on GitHub & also posted a workflow to my blog that may > capture what Russell is going for (if I understand it correctly): > http://blog.phytools.org/2023/10/visualizing-lineage-accumulation-on.html. > > All the best, Liam > Liam J. Revell > Professor of Biology, University of Massachusetts Boston > Web: http://faculty.umb.edu/liam.revell/ > Book: Phylogenetic Comparative Methods in R > <https://press.princeton.edu/books/phylogenetic-comparative-methods-in-r> > (*Princeton University Press*, 2022) > > > On 10/28/2023 6:56 PM, William Gearty wrote: > > CAUTION: EXTERNAL SENDER > > The output from Liam's function should be pretty useable for ggplot, too. I > think the function has a plot argument that you can just set to False. > > On Sat, Oct 28, 2023, 6:37 PM Russell Engelman <neovenatori...@gmail.com> > <neovenatori...@gmail.com> > wrote: > > > It looks like what Liam wrote (specifically, the final figure in the post) > is pretty close to what I am looking for. > > Emmanuel's suggestion of using ltt.plots.coords might also work, and it > might be easier to input that data into ggplot if I could find some way to > merge the various matrices. > > Russell > > On Fri, Oct 27, 2023 at 10:04 AM William Gearty <willgea...@gmail.com> > <willgea...@gmail.com> > wrote: > > > You could also map your states (in this case, taxonomic groupings) onto > your tree, then make an ltt plot with phytools::ltt(). Liam has a great > blog post about it > here:https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.phytools.org%2F2022%2F08%2Flineage-through-time-plots-for.html&data=05%7C01%7Cliam.revell%40umb.edu%7C9cff979c168d4a52a6b208dbd8092b8a%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638341306150821485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cCbfHtMBYBYoFjct9FzpZ78ZpUkRwrZLPH8gs68KnCM%3D&reserved=0 > <http://blog.phytools.org/2022/08/lineage-through-time-plots-for.html>. > > Best, > Will > > ------------------------------ > *William Gearty* > *Lerner-Gray Postdoctoral Research Fellow* > Division of Paleontology > American Museum of Natural Historywilliamgearty.com > > > > On Thu, Oct 26, 2023 at 9:55 PM Emmanuel Paradis <emmanuel.para...@ird.fr> > <emmanuel.para...@ird.fr> > wrote: > > > Hi Russell, > > There are several implementations of LTT plots among several packages, > so the details certainly differ depending on which one(s) you use. > > Maybe you can use the ape function ltt.plot.coords() which returns a > matrix with 2 columns giving the number of lineages for each node time of > the tree. I guess you'll need to do a bit of programming to combine the > different outputs from different trees. > > Best, > > Emmanuel > > ----- Le 27 Oct 23, à 8:05, Russell Engelman <neovenatori...@gmail.com> > <neovenatori...@gmail.com> > a écrit : > > > Dear R-Sig-Phylo, > I was wondering if there was any way to color-code a > > lineage-through-time plot, > > to highlight the proportion of taxa at specific intervals that belong > > to a > > particular clade. I.e., an LTT plot of tetrapod diversity through > > time, and I > > want to highlight the number of lineages at any one point in time that > > are > > chondrichthyans, sarcopterygians, lissamphibians, etc. (see attached > > fig. as an > > example). I figured I can do this by asking R to return all lineages > > that are > > descendants of a specific node, but am not sure what functions I can > > use to > > convert the dated tree into an object that can be read into ggplot. > > Sincerely, > Russell > > _______________________________________________ > R-sig-phylo mailing list - > R-sig-phylo@r-project.orghttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylo&data=05%7C01%7Cliam.revell%40umb.edu%7C9cff979c168d4a52a6b208dbd8092b8a%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638341306150821485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=09CJYjasrEglV7otz%2F3wBJwoB6LPnm4aIZa2id8qIvg%3D&reserved=0 > <https://stat.ethz.ch/mailman/listinfo/r-sig-phylo> > Searchable archive at > > https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2F&data=05%7C01%7Cliam.revell%40umb.edu%7C9cff979c168d4a52a6b208dbd8092b8a%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638341306150821485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0Y30O7gt7Fm2PeMjmk3jl%2F05j1z%2FwxmrVVQsLGPC8hg%3D&reserved=0 > <http://www.mail-archive.com/r-sig-phylo@r-project.org/> > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-phylo mailing list - > R-sig-phylo@r-project.orghttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylo&data=05%7C01%7Cliam.revell%40umb.edu%7C9cff979c168d4a52a6b208dbd8092b8a%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638341306150821485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=09CJYjasrEglV7otz%2F3wBJwoB6LPnm4aIZa2id8qIvg%3D&reserved=0 > <https://stat.ethz.ch/mailman/listinfo/r-sig-phylo> > Searchable archive > athttps://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2F&data=05%7C01%7Cliam.revell%40umb.edu%7C9cff979c168d4a52a6b208dbd8092b8a%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638341306150821485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0Y30O7gt7Fm2PeMjmk3jl%2F05j1z%2FwxmrVVQsLGPC8hg%3D&reserved=0 > <http://www.mail-archive.com/r-sig-phylo@r-project.org/> > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-phylo mailing list - > R-sig-phylo@r-project.orghttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylo&data=05%7C01%7Cliam.revell%40umb.edu%7C9cff979c168d4a52a6b208dbd8092b8a%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638341306150821485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=09CJYjasrEglV7otz%2F3wBJwoB6LPnm4aIZa2id8qIvg%3D&reserved=0 > <https://stat.ethz.ch/mailman/listinfo/r-sig-phylo> > Searchable archive at > https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2F&data=05%7C01%7Cliam.revell%40umb.edu%7C9cff979c168d4a52a6b208dbd8092b8a%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638341306150821485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0Y30O7gt7Fm2PeMjmk3jl%2F05j1z%2FwxmrVVQsLGPC8hg%3D&reserved=0 > <http://www.mail-archive.com/r-sig-phylo@r-project.org/> > > [[alternative HTML version deleted]] _______________________________________________ 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/