spiketools.plts.spikes.plot_waveform¶
- spiketools.plts.spikes.plot_waveform(waveform, timestamps=None, average=None, shade=None, add_traces=False, ax=None, **plt_kwargs)[source]¶
Plot a spike waveform.
- Parameters:
- waveform1d or 2d array
Voltage values of the spike waveform(s). If 2d, should have shape [n_waveforms, n_timestamps].
- timestamps1d array, optional
Timestamps corresponding to the waveform(s).
- average{‘mean’, ‘median’}, optional
Averaging to apply to waveforms before plotting. If provided, this takes an average across an assumed 2d array of waveforms.
- shade{‘sem’, ‘std’} or 1d array, optional
Measure of variance to compute and/or plot as shading.
- add_tracesbool, optional, default: False
Whether to also plot individual waveform traces. Only applicable if waveform is a 2d array.
- axAxes, optional
Axis object upon which to plot.
- plt_kwargs
Additional arguments to pass into the plot function. Custom kwargs: ‘traces_lw’, ‘traces_alpha’, ‘shade_alpha’.