Skip to content

Commit ace3181

Browse files
committed
bugs
1 parent 0f0229b commit ace3181

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/spikeinterface/widgets/amplitudes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AmplitudesWidget(BaseRasterWidget):
4141
(matplotlib backend)
4242
bins : int or None, default: None
4343
If plot_histogram is True, the number of bins for the amplitude histogram.
44-
If None this is automatically adjusted
44+
If None, use 100 bins.
4545
plot_legend : bool, default: True
4646
True includes legend in plot
4747
"""
@@ -104,6 +104,9 @@ def __init__(
104104
spiketrains_to_plot = all_spiketrains
105105
amplitudes_to_plot = all_amplitudes
106106

107+
if plot_histograms and bins is None:
108+
bins = 100
109+
107110
plot_data = dict(
108111
spike_train_data=spiketrains_to_plot,
109112
y_axis_data=amplitudes_to_plot,

src/spikeinterface/widgets/rasters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ def plot_matplotlib(self, data_plot, **backend_kwargs):
141141
if dp.color_kwargs is None:
142142
scatter_ax.scatter(unit_spike_train, unit_y_data, s=1, label=unit_id, color=unit_colors[unit_id])
143143
else:
144-
if dp.scatter_decimate != 1:
145-
color_kwargs = dp.color_kwargs
144+
color_kwargs = dp.color_kwargs
145+
if dp.scatter_decimate != 1 and color_kwargs.get("c") is not None:
146146
color_kwargs["c"] = dp.color_kwargs["c"][:: dp.scatter_decimate]
147147
scatter_ax.scatter(unit_spike_train, unit_y_data, s=1, label=unit_id, **color_kwargs)
148148

0 commit comments

Comments
 (0)