spiketools.plts.spatial.plot_position_by_time¶
- spiketools.plts.spatial.plot_position_by_time(timestamps, position, spikes=None, spike_positions=None, event_times=None, event_positions=None, event_kwargs=None, time_bins=None, position_bins=None, invert=None, ax=None, **plt_kwargs)[source]¶
Plot position across time for a single dimension.
- Parameters:
- timestamps1d array
Timestamps, in seconds, corresponding to the position values.
- position1d array
Position values, for a single dimension.
- spikes1d array, optional
Spike times, in seconds.
- spike_positions1d array, optional
Position values of spikes, to indicate on the plot.
- event_times1d array, optional
Time values of event markers to add to the plot. If provided, event_positions must also be provided.
- event_positions1d array, optional
Position values of event markers to add to the plot If provided, event_times must also be provided.
- event_kwargsdict, optional
Keyword arguments for styling the events to be added to the plot.
- time_binslist of float, optional
Bin edges for the time axis. If provided, these are used to draw vertical grid lines on the plot.
- position_binslist of float, optional
Bin edges for the position axis. If provided, these are used to draw horizontal grid lines on the plot.
- invert{‘x’, ‘y’, ‘both’}, optional
If provided, inverts the plot axes over x, y or both axes. Note that invert x is equivalent to flipping the data left/right, and y to flipping up/down.
- axAxes, optional
Axis object upon which to plot.
- plt_kwargs
Additional arguments to pass into the plot function.