Repository: spikeinterface/spikeinterface
Issue: widgets.plot_unit_waveforms throws an error whenever axis/axes are specified

# Minimal Example
```
# Import necessary modules
import spikeinterface.widgets as sw
import spikeinterface.core as sc
import spikeinterface.extractors as se
import matplotlib.pyplot as plt

# Generate Waveform Extractor
recording, sorting = se.toy_example(seed=0)
we_path = "/Volumes/T7/CatalystNeuro/WidgetsError/waveforms"
we = sc.extract_waveforms(recording, sorting, we_path, overwrite=True)

# Plot
fig, axs = plt.subplots(len(we.unit_ids), 1)
sw.plot_unit_waveforms(we, axes=axs)
```

# Traceback
```
KeyError                                  Traceback (most recent call last)
Cell In[11], line 14
     12 fig, axs = plt.subplots(len(we.unit_ids), 1)
     13 # sw.plot_unit_waveforms(we, unit_ids=[0], axes=ax)
---> 14 sw.plot_unit_waveforms(we, axes=axs)

File ~/Documents/CatalystNeuro/template_deconvolution/spikeinterface/src/spikeinterface/widgets/base.py:116, in define_widget_function_from_class.<locals>.widget_func(*args, **kwargs)
    113 @copy_signature(widget_class)
    114 def widget_func(*args, **kwargs):
    115     W = widget_class(*args, **kwargs)
--> 116     W.do_plot(W.backend, **W.backend_kwargs)
    117     return W.plotter

File ~/Documents/CatalystNeuro/template_deconvolution/spikeinterface/src/spikeinterface/widgets/base.py:53, in BaseWidget.do_plot(self, backend, **backend_kwargs)
     51 plotter = self.possible_backends[backend]()
     52 self.check_backend_kwargs(plotter, backend, **backend_kwargs)
---> 53 plotter.do_plot(self.plot_data, **backend_kwargs)
     54 self.plotter = plotter

File ~/Documents/CatalystNeuro/template_deconvolution/spikeinterface/src/spikeinterface/widgets/matplotlib/unit_waveforms.py:18, in UnitWaveformPlotter.do_plot(self, data_plot, **backend_kwargs)
     15 backend_kwargs = self.update_backend_kwargs(**backend_kwargs)
     17 if backend_kwargs["axes"] is not None:
---> 18     assert len(backend_kwargs) >= len(dp.units)
     19 elif backend_kwargs["ax"] is not None:
     20     assert dp.same_axis, "If 'same_axis' is not used, provide as many 'axes' as neurons"

File ~/Documents/CatalystNeuro/template_deconvolution/spikeinterface/src/spikeinterface/widgets/base.py:109, in to_attr.__getattribute__(self, k)
    107 def __getattribute__(self, k):
    108     d = object.__getattribute__(self, '__d')
--> 109     return d[k]

KeyError: 'units'
```

# Notes
Using latest spikeinterface version 0.98.0.dev0

Changed files:
src/spikeinterface/widgets/matplotlib/unit_waveforms.py

diff --git a/src/spikeinterface/widgets/matplotlib/unit_waveforms.py b/src/spikeinterface/widgets/matplotlib/unit_waveforms.py
index c69add5b..cd67f1eb 100644
--- a/src/spikeinterface/widgets/matplotlib/unit_waveforms.py
+++ b/src/spikeinterface/widgets/matplotlib/unit_waveforms.py
@@ -15,7 +15,7 @@ class UnitWaveformPlotter(MplPlotter):
         backend_kwargs = self.update_backend_kwargs(**backend_kwargs)
 
         if backend_kwargs["axes"] is not None:
-            assert len(backend_kwargs) >= len(dp.units)
+            assert len(backend_kwargs["axes"]) >= len(dp.unit_ids), "Provide as many 'axes' as neurons"
         elif backend_kwargs["ax"] is not None:
             assert dp.same_axis, "If 'same_axis' is not used, provide as many 'axes' as neurons"
         else: