pytyche.viz.plot_segment_intervals

pytyche.viz.plot_segment_intervals(segments, ax=None)[source]

Forest plot of per-segment gate estimates with 80% intervals.

The interval bar spans gate_ci exactly; the marker sits at gate_estimate (drawn separately because a skewed posterior can place the mean outside the percentile interval, which an errorbar-around-the-mean cannot represent).

Parameters:
  • segments (Sequence[DiscoveredSegment]) – Discovered segments to plot, one row per segment, labeled by their rule descriptions.

  • ax (Axes | None) – Existing axes to draw into; None creates a new figure.

Return type:

Axes

Returns:

The axes containing the error-bar and marker artists.