trackpy.plot_displacements

trackpy.plot_displacements(t, frame1, frame2, scale=1, ax=None, pos_columns=None, **kwargs)

Plot arrows showing particles displacements between two frames.

Parameters:

t : DataFrame

trajectories, including columns ‘frame’ and ‘particle’

frame1 : integer

frame number

frame2 : integer

frame number

scale : float

scale factor, if 1 (default) then arrow end is placed at particle destination; if any other number arrows are rescaled

pos_columns : list of strings, optional

Dataframe column names for spatial coordinates. Default is [‘x’, ‘y’].

ax : matplotlib axes (optional)

Notes

Any other keyword arguments will pass through to matplotlib’s annotate.