spiketools.plts.spatial.plot_positions

spiketools.plts.spatial.plot_positions(position, spike_positions=None, landmarks=None, x_bins=None, y_bins=None, invert=None, ax=None, **plt_kwargs)[source]

Plot positions.

Parameters:
position2d array or list of 2d array

Position data. If a list, each array from the list is plotted separately, on the same plot.

spike_positions2d array or dict, optional

Position values of spikes, to indicate on the plot. If array, defines the positions. If dictionary, should include a ‘positions’ key plus additional plot arguments.

landmarks1d or 2d array or dict or list, optional

Position values of landmarks, to be added to the plot. If array, defines the positions, as [x, y] for a single landmark 1d array, or as [[x-pos], [y-pos]] for a 2d definition of multiple landmarks. If dictionary, should include a ‘positions’ key with an array plus additional arguments. Multiple landmarks can be added by passing a list of arrays or a list of dictionaries.

x_bins, y_binslist of float, optional

Bin edges for each axis. If provided, these are used to draw 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.