uvex_transients.utils.plotting.add_funnel_legend#

uvex_transients.utils.plotting.add_funnel_legend(ax: Axes, loc: str = 'best') → None[source]#

Add legend entries explaining plot_detection_funnel’s two uncertainty layers.

Appends two proxy handles – a black capped error bar labeled “MC (statistical) uncertainty” and a pale, outlined gray patch labeled “Rate (systematic) uncertainty” – to whatever handles/labels ax already has (e.g. one legend entry per bar color/label from a grouped funnel), then redraws the legend with all of them together. The proxies use a neutral gray rather than matching any one bar’s color, since both uncertainty layers have the same meaning for every bar regardless of its own color.

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to add the legend to; normally the same ax passed to one or more plot_detection_funnel calls.

  • loc (str, optional) – Forwarded to ~matplotlib.axes.Axes.legend. The default is "best".