Skip to content

Commit 9053a81

Browse files
committed
update unit_colors docstring EVERYWHERE
1 parent 78923ba commit 9053a81

14 files changed

Lines changed: 40 additions & 31 deletions

src/spikeinterface/widgets/all_amplitudes_distributions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ class AllAmplitudesDistributionsWidget(BaseWidget):
1919
The SortingAnalyzer
2020
unit_ids : list
2121
List of unit ids, default None
22-
unit_colors : None or dict
23-
Dict of colors with key : unit, value : color, default None
22+
unit_colors : dict | None, default: None
23+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
24+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
2425
"""
2526

2627
def __init__(

src/spikeinterface/widgets/amplitudes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class AmplitudesWidget(BaseRasterWidget):
2323
unit_ids : list or None, default: None
2424
List of unit ids
2525
unit_colors : dict | None, default: None
26-
Dict of colors with key : unit, value : color. If None, uses `get_some_colors` to
27-
generate colors.
26+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
27+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
2828
segment_index : int or None, default: None
2929
The segment index (or None if mono-segment)
3030
max_spikes_per_unit : int or None, default: None

src/spikeinterface/widgets/crosscorrelograms.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ class CrossCorrelogramsWidget(BaseWidget):
3131
this argument is ignored
3232
hide_unit_selector : bool, default: False
3333
For sortingview backend, if True the unit selector is not displayed
34-
unit_colors : dict or None, default: None
35-
If given, a dictionary with unit ids as keys and colors as values
34+
unit_colors : dict | None, default: None
35+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
36+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
3637
"""
3738

3839
def __init__(

src/spikeinterface/widgets/metrics.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ class MetricsBaseWidget(BaseWidget):
2424
If given, a list of quality metrics to skip, default: None
2525
include_metrics: list or None, default: None
2626
If given, a list of quality metrics to include, default: None
27-
unit_colors : dict or None, default: None
28-
If given, a dictionary with unit ids as keys and colors as values
27+
unit_colors : dict | None, default: None
28+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
29+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
2930
hide_unit_selector : bool, default: False
3031
For sortingview backend, if True the unit selector is not displayed
3132
include_metrics_data : bool, default: True

src/spikeinterface/widgets/quality_metrics.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ class QualityMetricsWidget(MetricsBaseWidget):
1818
If given, a list of quality metrics to include
1919
skip_metrics : list or None, default: None
2020
If given, a list of quality metrics to skip
21-
unit_colors : dict or None, default: None
22-
If given, a dictionary with unit ids as keys and colors as values
21+
unit_colors : dict | None, default: None
22+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
23+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
2324
hide_unit_selector : bool, default: False
2425
For sortingview backend, if True the unit selector is not displayed
2526
"""

src/spikeinterface/widgets/rasters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class BaseRasterWidget(BaseWidget):
3030
scatter_decimate : int | None, default: None
3131
If equal to n, each nth spike is kept for plotting.
3232
unit_colors : dict | None, default: None
33-
Dict of colors with key : unit, value : color. If None, uses `get_some_colors` to
34-
generate colors.
33+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
34+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
3535
color_kwargs : dict | None, default: None
3636
More color control for e.g. colouring spikes by property. Passed to `maplotlib.scatter`.
3737
plot_legend : bool, default: False

src/spikeinterface/widgets/spike_locations.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ class SpikeLocationsWidget(BaseWidget):
2323
Number of max spikes per unit to display. Use None for all spikes.
2424
with_channel_ids : bool, default: False
2525
Add channel ids text on the probe
26-
unit_colors : dict or None, default: None
27-
If given, a dictionary with unit ids as keys and colors as values
26+
unit_colors : dict | None, default: None
27+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
28+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
2829
hide_unit_selector : bool, default: False
2930
For sortingview backend, if True the unit selector is not displayed
3031
plot_all_units : bool, default: True

src/spikeinterface/widgets/spikes_on_traces.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ class SpikesOnTracesWidget(BaseWidget):
3232
sparsity : ChannelSparsity or None, default: None
3333
Optional ChannelSparsity to apply
3434
If SortingAnalyzer is already sparse, the argument is ignored
35-
unit_colors : dict or None, default: None
36-
If given, a dictionary with unit ids as keys and colors as values
37-
If None, then the get_unit_colors() is internally used. (matplotlib backend)
35+
unit_colors : dict | None, default: None
36+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
37+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
3838
mode : "line" | "map" | "auto", default: "auto"
3939
* "line": classical for low channel count
4040
* "map": for high channel count use color heat map

src/spikeinterface/widgets/template_metrics.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ class TemplateMetricsWidget(MetricsBaseWidget):
1818
If given list of quality metrics to include
1919
skip_metrics : list or None or None, default: None
2020
If given, a list of quality metrics to skip
21-
unit_colors : dict or None, default: None
22-
If given, a dictionary with unit ids as keys and colors as values
21+
unit_colors : dict | None, default: None
22+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
23+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
2324
hide_unit_selector : bool, default: False
2425
For sortingview backend, if True the unit selector is not displayed
2526
"""

src/spikeinterface/widgets/unit_depths.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ class UnitDepthsWidget(BaseWidget):
1818
----------
1919
sorting_analyzer : SortingAnalyzer
2020
The SortingAnalyzer object
21-
unit_colors : dict or None, default: None
22-
If given, a dictionary with unit ids as keys and colors as values
21+
unit_colors : dict | None, default: None
22+
Dict of colors with unit ids as keys and colors as values. Colors can be any type accepted
23+
by matplotlib. If None, default colours are chosen using the `get_some_colors` function.
2324
depth_axis : int, default: 1
2425
The dimension of unit_locations that is depth
2526
peak_sign : "neg" | "pos" | "both", default: "neg"

0 commit comments

Comments
 (0)