circle_bundles.plot_local_rips
- circle_bundles.plot_local_rips(fiber_ids, rips_list, *, n_cols=4, titles='default', font_size=16, save_path=None)[source]
Plot a grid of persistence diagrams for multiple fibers.
This function is typically used with the output of
get_local_rips(). Each subplot corresponds to one fiber; fibers with missing ripser output are hidden.- Parameters:
fiber_ids (Sequence[int]) – Fiber indices (for labeling). Usually the first output of
get_local_rips().rips_list (Sequence[dict | None]) – Per-fiber ripser outputs. Usually the third output of
get_local_rips(). Each entry should be a dict containing a"dgms"key, or None to skip.n_cols (int) – Number of columns in the subplot grid.
titles (str | Sequence[str] | None) –
- Title behavior:
"default": uses LaTeX titles of the form\pi^{-1}(U_j).None: no titles.
sequence of strings: custom titles aligned with
fiber_ids.
font_size (int) – Title font size.
save_path (str | None) – If provided, save the figure to this path.
- Returns:
The matplotlib figure and a flat array of axes.
- Return type:
fig, axes
Notes
This function lazily imports
persim(forplot_diagrams) so importing this module does not require persim unless you call it.