Plot.bammdata with time scale?

67 views
Skip to first unread message

Jamie T

unread,
Apr 19, 2022, 5:21:51 PM4/19/22
to bamm-project
Hiya,

I'm trying to plot bamm output with a timescale along the bottom.  Is this possible?

Jamie

pasca...@gmail.com

unread,
Apr 20, 2022, 9:00:55 AM4/20/22
to bamm-project
Hi Jamie,

Yes, this is possible - anything can be added to plots of bamm data. For example, you can add a very simple timescale with the axisPhylo() function from the ape package.

library(BAMMtools)
library(ape)

data(whales, events.whales)
ed <- getEventData(whales, events.whales, burnin=0.25, nsamples=500)
plot(ed, lwd = 3, spex = "s")
axisPhylo()

There are other R packages that provide more complex timescales, including for example geological periods, etc. Those could be added as well.

-Pascal

Jamie T

unread,
Apr 26, 2022, 8:13:00 AM4/26/22
to bamm-project
Hi,

Thanks for this!

Jamie

Reply all
Reply to author
Forward
0 new messages