plot_signals_with_reference_labels#

pepbench.plotting.plot_signals_with_reference_labels(datapoint: BasePepDatasetWithAnnotations, *, heartbeat_subset: Sequence[int] | None = None, collapse: bool = False, normalize_time: bool = False, **kwargs: Any) tuple[Figure, Axes | Sequence[Axes]][source]#

Plot signals and overlay reference Q-peaks and B-points.

# TODO: not showing in docu

Parameters:
datapointBasePepDatasetWithAnnotations

Dataset containing ECG/ICG traces and reference annotations.

heartbeat_subsetSequence[int] | None, optional

Subset of heartbeat indices to plot. If None, all heartbeats are plotted.

collapsebool, optional

If True, plot ECG and ICG on a single axis. Default: False.

normalize_timebool, optional

If True, convert time index to seconds. Default: False.

**kwargsAny

Additional plotting options forwarded to the low-level plotting helpers (legend placement, axis handling, colours, etc.).

Returns:
(fig, ax)tuple[

Figure, Axes | Sequence[Axes] ] Matplotlib figure and axis (or sequence of axes) containing the rendered traces.

Notes

This function augments the base signal plotting with reference labels (Q-peaks, B-points and artefacts) via pepbench.plotting._utils utilities and then handles legends/layout according to the project conventions.