package to plot events and time between events in time series

Hello R-studio community!

I am searching for a package that lets me plot my data like this:

(Taken from Karsai et al., 2018 and Cencetti et al., 2021)

Do you have any idea whether a package like this exists in R? I am not quite sure how to call these types of plots but they show events of a time series and the color indicates how much time between consecutive events passes (the darker, the quicker the succession of events).

Thank you for your replies in advance!


I always call these barcode plots (though I don't think that's an official name). You may see them more often as "rug plots" in the margins of other plots.

The blog post here uses this style (though not separated out into variables by colour), I would think you could adapt it by using facet_wrap() or similar:

Example from post:

See also the source code for the function the post author made, cantemp_barcode() here:

Also possibly of interest:


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.