tdaverse / ggtda

ggplot2 extension to visualize persistent homology
https://tdaverse.github.io/ggtda/
GNU General Public License v3.0
20 stars 5 forks source link

graphical element for fundamental boxes #24

Closed corybrunson closed 3 years ago

corybrunson commented 3 years ago

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 bt<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().

corybrunson commented 3 years ago

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.