hnn_core.viz.plot_spikes_raster#
- hnn_core.viz.plot_spikes_raster(cell_response, trial_idx=None, ax=None, show=True, cell_types=None, colors=None, show_legend=True, marker_size=1.0, dpl=None, overlay_dipoles=False)[source]#
Plot the aggregate spiking activity according to cell type.
- Parameters:
- cell_responseinstance of CellResponse
The CellResponse object from net.cell_response
- trial_idxint | list of int | None
Index of trials to be plotted. If None, all trials plotted
- axinstance of matplotlib axis | None
An axis object from matplotlib. If None, a new figure is created.
- showbool
If True, show the figure.
- cell_typeslist of str
List of cell types to plot
- colorslist of str | None
Optional custom colors to plot. Default will use the color cycler.
- show_legendbool
If True, show the legend with colors for cell types
- marker_sizefloat
Optional marker size to use when plotting spikes. Uses “linelengths” argument of ax.eventplot, which accepts positive numeric values only
- dplinstance of Dipole | list
The Dipole object containing layer-specific dipole data to overlay on the raster plot
- overlay_dipolesbool
If True, overlay the layer-specific dipole data on the raster plot
- Returns:
- figinstance of matplotlib Figure
The matplotlib figure object.