spiketools.plts.spatial.plot_position_1d

spiketools.plts.spatial.plot_position_1d(position, events=None, colors=None, sizes=None, ax=None, **plt_kwargs)[source]

Position 1d position data, with annotated events.

Parameters:
position1d array

Position data.

events1d array or dict or list

Events to add to the plot, as vertical lines. If array, defines the position(s) of each event. If dictionary, should include a ‘positions’ key with an array plus additional arguments. Multiple event definitions can be passed in as a list of dictionaries or arrays.

colorsstr or list of str

Color(s) for each event. Only used if events are passed in as an array or list of arrays.

sizesfloat or list of float

Size(s) for each event. Only used if events are passed in as an array or list of arrays.

axAxes, optional

Axis object upon which to plot.

plt_kwargs

Additional arguments to pass into the plot function. Custom kwargs: ‘position_color’, ‘position_alpha’, ‘position_linewidth’.