Contributing guidelines
Documentation
Existing issues
What problem does your feature proposal solve?
Allow users to create animated plots of routes on graphs. For routes that cover all or most edges of a graph, a static plot doesn't show the route very clearly.
What is your proposed solution?
Use matplotlib.animations.FuncAnimation to animate route(s) step-by-step.
Either:
- Add a new
osmnx.plot.animate_graph_route function for this feature
- Add
animate: bool argument to the existing osmnx.plot.plot_graph_route function
What alternatives have you considered?
Of course users can implement this themselves outside of osmnx, not sure if this passes the "not trivially easy" criteria from contributing guidelines.
Additional context
I've been using osmnx for a toy project looking at the route inspection problem. Huge thanks for this awesome project, made it easy for me to get started playing with the actual problem quickly instead of writing code to fetch road data and convert it into graphs. For my use case I found that plotting the entire route at once isn't particularly insightful -- my routes always cover the entire graph -- so I implemented animation for myself. Figured it may be useful to others and worth contributing back.
I've technically made a liar of myself by checking the "Nothing similar appears in an existing issue" box. I see two old, closed issues mentioning animation:
In #226 the animation piece is only mentioned tangentially, in #109 a user asks for help doing this but doesn't explicitly propose/request a feature.
Can post a brief code snippet with minimal example a bit later today.
Contributing guidelines
Documentation
Existing issues
What problem does your feature proposal solve?
Allow users to create animated plots of routes on graphs. For routes that cover all or most edges of a graph, a static plot doesn't show the route very clearly.
What is your proposed solution?
Use
matplotlib.animations.FuncAnimationto animate route(s) step-by-step.Either:
osmnx.plot.animate_graph_routefunction for this featureanimate: boolargument to the existingosmnx.plot.plot_graph_routefunctionWhat alternatives have you considered?
Of course users can implement this themselves outside of
osmnx, not sure if this passes the "not trivially easy" criteria from contributing guidelines.Additional context
I've been using
osmnxfor a toy project looking at the route inspection problem. Huge thanks for this awesome project, made it easy for me to get started playing with the actual problem quickly instead of writing code to fetch road data and convert it into graphs. For my use case I found that plotting the entire route at once isn't particularly insightful -- my routes always cover the entire graph -- so I implemented animation for myself. Figured it may be useful to others and worth contributing back.I've technically made a liar of myself by checking the "Nothing similar appears in an existing issue" box. I see two old, closed issues mentioning animation:
In #226 the animation piece is only mentioned tangentially, in #109 a user asks for help doing this but doesn't explicitly propose/request a feature.
Can post a brief code snippet with minimal example a bit later today.