Skip to content

Add marker customization to plot_trajectories#539

Draft
schroedtert wants to merge 1 commit into
PedestrianDynamics:mainfrom
schroedtert:improve-plot-trajectory-marker
Draft

Add marker customization to plot_trajectories#539
schroedtert wants to merge 1 commit into
PedestrianDynamics:mainfrom
schroedtert:improve-plot-trajectory-marker

Conversation

@schroedtert
Copy link
Copy Markdown
Collaborator

@schroedtert schroedtert commented May 8, 2026

Allow independent control of start, end, and frame markers:

  • traj_start/end_color: marker color (default: traj_color)
  • traj_start/end_marker_size: marker size
  • traj_start/end_marker_alpha: marker alpha
  • traj_frame: int or list of frames to mark positions at
  • traj_frame_marker/color/size/alpha: style the frame markers

Markers are now drawn with zorder=3 so they always appear on top of the trajectory lines (zorder=2).

Example call:

# color and size for start/end markers
plot_trajectories(
    traj=traj, 
    traj_start_marker="o", 
    traj_start_color="green", 
    traj_start_marker_size=10, 
    traj_start_marker_alpha=0.5, 
    traj_end_marker="x", 
    traj_end_color="blue", 
    traj_end_marker_size=50
)
# display markers at frame
plot_measurement_setup(
    traj=traj, 
    traj_frame=1000, 
    traj_frame_marker="x",
    traj_frame_color="k", 
    traj_frame_marker_size=10, 
    traj_frame_marker_alpha=0.9, 
)

To test locally:

pip install git+https://github.com/schroedtert/PedPy.git@improve-plot-trajectory-marker

Closes #536

Allow independent control of start, end, and frame markers:
- traj_start/end_color: marker color (default: traj_color)
- traj_start/end_marker_size: marker size
- traj_start/end_marker_alpha: marker alpha
- traj_frame: int or list of frames to mark positions at
- traj_frame_marker/color/size/alpha: style the frame markers

Markers are now drawn with zorder=3 so they always appear
on top of the trajectory lines (zorder=2).
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.07%. Comparing base (d362055) to head (93450f0).

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Additional Arguments for plot_measurement_setup

1 participant