Skip to content

Add colorbar and an option to plot the velocities to plot_traj()#800

Open
T0T0R wants to merge 1 commit intosoft-matter:masterfrom
T0T0R:master
Open

Add colorbar and an option to plot the velocities to plot_traj()#800
T0T0R wants to merge 1 commit intosoft-matter:masterfrom
T0T0R:master

Conversation

@T0T0R
Copy link
Contributor

@T0T0R T0T0R commented Mar 7, 2026

A color bar can now be added when plotting the trajectories, which is helpful with colorby='frame'. The title of this colorbar can be selected between "Frame number" or "Time (s)".
Example with tp.plot_traj(t, mpp=1.0, fps=24, colorby='frame', cmap='cividis', colorbar_units='frames', superimpose=background):
02

Example with tp.plot_traj(t, mpp=1.0, fps=24, colorby='frame', cmap='cividis', colorbar_units='real', superimpose=background):
01

Another feature is added, colorby='velocity' allowing to color the trajectories by the speed of the objects. The title of the color bar can be selected between "Speed (px/s)" or "Speed (µm/s)".
Example with tp.plot_traj(t, mpp=1.0, fps=24, colorby='velocity', cmap='inferno', colorbar_units='frames', superimpose=background);:
04

Example with tp.plot_traj(t, mpp=1.0, fps=24, colorby='velocity', cmap='inferno', colorbar_units='real', superimpose=background);:
03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant