diff --git a/src/spikeinterface/widgets/unit_summary.py b/src/spikeinterface/widgets/unit_summary.py index fd7dafd5d6..6c39c902eb 100644 --- a/src/spikeinterface/widgets/unit_summary.py +++ b/src/spikeinterface/widgets/unit_summary.py @@ -85,6 +85,7 @@ def plot_matplotlib(self, data_plot, **backend_kwargs): unit_colors = dp.unit_colors sparsity = dp.sparsity + # defaultdict returns empty dict if key not found in subwidget_kwargs subwidget_kwargs = defaultdict(lambda: dict(), dp.subwidget_kwargs) unitlocationswidget_kwargs = subwidget_kwargs["unit_locations"] unitwaveformswidget_kwargs = subwidget_kwargs["unit_waveforms"]