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: 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 History williamgearty.com On Thu, Oct 26, 2023 at 9:55 PM Emmanuel Paradis <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> 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.org > > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > > Searchable archive at > 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/ > [[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/