plot_spike_trains#
- myogen.utils.plotting.plot_spike_trains(spike_trains__matrix, timestep__ms, axs, pool_current__matrix=None, pool_to_plot=None, apply_default_formatting=True, **kwargs)[source]#
Plot spike trains for each motor neuron pool.
- Parameters:
spike_trains__matrix (
SPIKE_TRAIN__MATRIX
) – The spike trains matrix to plot.timestep__ms (
float
) – Simulation timestep in ms.axs (
beartype.cave.IterableType
[matplotlib.axes.Axes
]) – Matplotlib axes to plot on. This could be the same axis for all pools, or a separate axis for each pool.pool_current__matrix (
INPUT_CURRENT__MATRIX
|None
, optional) – The input current matrix to plot, by default None.pool_to_plot (
list
[int
] |None
, optional) – The pools to plot if not all pools should be plotted, by default None (all pools are plotted).apply_default_formatting (
bool
, optional) – Whether to apply default formatting to the plot, by default True.**kwargs (
Any
) – Additional keyword arguments to pass to the plot function. Only used if apply_default_formatting is False.
- Returns:
The axes that were plotted on.
- Return type:
beartype.cave.IterableType
[matplotlib.axes.Axes
]- Raises:
ValueError – If the number of axes does not match the number of pools to plot.