plot_raster_spikes#

plot_raster_spikes(
results: Block,
axs: Iterable[Axes],
populations: list[str],
time_range: tuple[float, float] | None = None,
dot_size: float = 0.8,
alpha: float = 1.0,
title: str = 'Raster Plot',
xlabel: str = 'Time [ms]',
ylabel: str = 'Neuron ID',
apply_default_formatting: bool = True,
**kwargs: Any,
) Iterable[Axes][source]#

Plot spike raster plots for neural populations, one per axis.

Parameters:
  • results (Block) – NEO Block containing spike train segments for each population.

  • axs (IterableType[Axes]) – Matplotlib axes to plot on. Must have as many axes as populations.

  • populations (list[str]) – List of population names to plot.

  • time_range (tuple[float, float], optional) – Time range to plot (start, end) in milliseconds, by default None (full range).

  • dot_size (float, optional) – Size of spike markers, by default 0.8.

  • alpha (float, optional) – Transparency of spike markers (0.0 to 1.0), by default 1.0.

  • title (str, optional) – Plot title, by default “Raster Plot”.

  • xlabel (str, optional) – X-axis label, by default “Time [ms]”.

  • ylabel (str, optional) – Y-axis label, by default “Neuron ID”.

  • apply_default_formatting (bool, optional) – Whether to apply default formatting, by default True.

  • **kwargs (Any) – Additional keyword arguments passed to matplotlib plot functions.

Returns:

The axes that were plotted on.

Return type:

IterableType[Axes]