Skip to content

Improve color handling and documentation of plot_neighborhood#469

Merged
schroedtert merged 1 commit intoPedestrianDynamics:mainfrom
schroedtert:fix-color-plot-neighborhood
Aug 21, 2025
Merged

Improve color handling and documentation of plot_neighborhood#469
schroedtert merged 1 commit intoPedestrianDynamics:mainfrom
schroedtert:fix-color-plot-neighborhood

Conversation

@schroedtert
Copy link
Copy Markdown
Collaborator

@schroedtert schroedtert commented Aug 14, 2025

  • Fix bug, that the color could not be set as expected
  • Forward walkable area options correctly
  • Improve documentation, state clear what base and default pedestrians
    are
  • Add options to control alpha of default, base, and neighbor
    pedestrians
  • Add options to print without walkable area
from pedpy import plot_neighborhood

plot_neighborhood(
    pedestrian_id=5,
    voronoi_data=voronoi_data,
    frame=0,
    neighbors=neighbors_single,
    base_color="red",
    base_alpha=0.7,
    default_color="blue",
    default_alpha=0.2,
    neighbor_color="green",
    neighbor_alpha=0.5,
    walkable_area=walkable_area,
    line_color="magenta",
    line_width=5,

).set_aspect("equal")
plt.show()
image

Closes #465

@schroedtert schroedtert force-pushed the fix-color-plot-neighborhood branch 4 times, most recently from 5aaa5df to 9111271 Compare August 17, 2025 18:19
- Fix bug, that the color could not be set as expected
- Forward walkable area options correctly
- Improve documentation, state clear what base and default pedestrians
  are
- Add options to control alpha of default, base, and neighbor
  pedestrians
- Add options to print without walkable area
@schroedtert schroedtert force-pushed the fix-color-plot-neighborhood branch from 9111271 to 73e53fe Compare August 17, 2025 18:34
@schroedtert schroedtert marked this pull request as ready for review August 18, 2025 08:53
@schroedtert schroedtert merged commit fca0d85 into PedestrianDynamics:main Aug 21, 2025
25 checks passed
@schroedtert schroedtert deleted the fix-color-plot-neighborhood branch August 21, 2025 06:47
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.33%. Comparing base (65afabb) to head (73e53fe).
⚠️ Report is 29 commits behind head on main.

☔ 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.

Functionality / Doku / API of plot_neighborhood

2 participants