plot_membrane_potentials#

plot_membrane_potentials(
results: Block,
axs: Iterable[Axes],
populations: list[str] | str = 'aMN',
cell_indices: list[int] = [0, 10, 20, 30, 40],
time_range: tuple[float, float] | None = None,
title: str = 'Membrane Potential',
xlabel: str = 'Time [ms]',
ylabel: str = 'Voltage [mV]',
apply_default_formatting: bool = True,
**kwargs: Any,
) Iterable[Axes][source]#

Plot membrane potential traces for selected cells across populations.

Parameters:
  • results (Block) – NEO Block containing analog signal segments for membrane potentials.

  • axs (IterableType[Axes]) – Matplotlib axes to plot on. If populations is a list, must have as many axes as populations.

  • populations (list[str] | str, optional) – Population name(s) to plot. If list, plots one per axis. By default “aMN”.

  • cell_indices (list[int], optional) – List of cell indices to plot, by default [0, 10, 20, 30, 40].

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

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

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

  • ylabel (str, optional) – Y-axis label, by default “Voltage [mV]”.

  • 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]