Skip to content

Commit e525d85

Browse files
authored
Merge pull request #3461 from jakeswann1/plot_traces_vspacing
Add vspacing_factor as a param for TracesWidget
2 parents 309ce30 + c1504f6 commit e525d85

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/spikeinterface/widgets/traces.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ class TracesWidget(BaseWidget):
5252
If dict, keys should be the same as recording keys
5353
scale : float, default: 1
5454
Scale factor for the traces
55+
vspacing_factor : float, default: 1.5
56+
Vertical spacing between channels as a multiple of maximum channel amplitude
5557
with_colorbar : bool, default: True
5658
When mode is "map", a colorbar is added
5759
tile_size : int, default: 1500
@@ -82,6 +84,7 @@ def __init__(
8284
tile_size=1500,
8385
seconds_per_row=0.2,
8486
scale=1,
87+
vspacing_factor=1.5,
8588
with_colorbar=True,
8689
add_legend=True,
8790
backend=None,
@@ -168,7 +171,7 @@ def __init__(
168171
traces0 = list_traces[0]
169172
mean_channel_std = np.mean(np.std(traces0, axis=0))
170173
max_channel_amp = np.max(np.max(np.abs(traces0), axis=0))
171-
vspacing = max_channel_amp * 1.5
174+
vspacing = max_channel_amp * vspacing_factor
172175

173176
if rec0.get_channel_groups() is None:
174177
color_groups = False

0 commit comments

Comments
 (0)