plot_signals_with_algorithm_results#
- pepbench.plotting.plot_signals_with_algorithm_results(datapoint: BasePepDatasetWithAnnotations, *, collapse: bool = False, algorithm: BaseExtraction, normalize_time: bool = False, heartbeat_subset: Sequence[int] | None = None, **kwargs: Any) tuple[Figure, Axes | Sequence[Axes]][source]#
Plot signals and overlay detections from an algorithm.
- Parameters:
- datapoint
BasePepDatasetWithAnnotations Dataset to annotate with algorithm detections.
- collapsebool, optional
If
True, plot ECG and ICG on a single axis. Default:False.- algorithm
biopsykit.signals._base_extraction.BaseExtraction Extraction algorithm instance used to detect peaks/points. The function will call
algorithm.extract(...)and then plotalgorithm.points_.- normalize_timebool, optional
If
True, convert time index to seconds. Default:False.- heartbeat_subsetSequence[int] | None, optional
Subset of heartbeat indices to run the algorithm on. If
None, all are used.- **kwargsAny
Additional plotting options.
- datapoint
- Returns:
Notes
Supports ECG algorithms implementing heartbeat-aware extraction (
biopsykit.signals.ecg.event_extraction.BaseEcgExtractionWithHeartbeats) and B-point extraction algorithms (biopsykit.signals.icg.event_extraction.BaseBPointExtraction).