tdaverse/ggtda

graphical element for fundamental boxes

Closed this issue · 1 comments

The authors of this preprint define the fundamental box for any real value t. Ignoring multiplicities, it is the region of birth–death pairs (b,d) defined by b_≤_t<d; it can be thought of as the space of features whose lifetimes include t. Like the colleague who introduced me to it, i think i've seen it before under a different name.

It would be natural to highlight this region in certain plots, as the authors do in the preprint, using bounding rays and shading within the limits of the plotting window. It should be easy to implement as a new graphical element (e.g. geom_fundamental_box()) with a single additional non-aesthetic parameter t that also requires the same diagram parameter used by stat_persistence().

This SO question and its answers provide some possibly helpful raw material for this element. Ideally the graphical element would be constructed at the level of grid rather than of ggplot2, but i haven't tried making polygons that fill out the plotting window before.