Skip to content

Commit

Permalink
Added kwargs options to plot_spikes_hist
Browse files Browse the repository at this point in the history
Signed-off-by: samadpls <[email protected]>
  • Loading branch information
samadpls committed Mar 19, 2024
1 parent 21dcea5 commit 04f08be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hnn_core/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def plot_dipole(dpl, tmin=None, tmax=None, ax=None, layer='agg', decim=None,


def plot_spikes_hist(cell_response, trial_idx=None, ax=None, spike_types=None,
color=None, show=True):
color=None, show=True, **kwargs):
"""Plot the histogram of spiking activity across trials.
Parameters
Expand Down Expand Up @@ -369,6 +369,8 @@ def plot_spikes_hist(cell_response, trial_idx=None, ax=None, spike_types=None,
If None, default color cycle used.
show : bool
If True, show the figure.
**kwargs : dict
Additional keyword arguments to pass to ax.hist.
Returns
-------
Expand Down Expand Up @@ -473,7 +475,7 @@ def plot_spikes_hist(cell_response, trial_idx=None, ax=None, spike_types=None,
for spike_label, plot_data in spike_type_times.items():
hist_color = spike_color[spike_label]
ax.hist(plot_data, bins,
label=spike_label, color=hist_color)
label=spike_label, color=hist_color, **kwargs)

ax.set_ylabel("Counts")
ax.legend()
Expand Down

0 comments on commit 04f08be

Please sign in to comment.