Add curved_quiver — Curved Vector Field Arrows for 2D Plots#361
Add curved_quiver — Curved Vector Field Arrows for 2D Plots#361beckermr merged 36 commits intoUltraplot:mainfrom
curved_quiver — Curved Vector Field Arrows for 2D Plots#361Conversation
curved_quiver — Curved Vector Field Arrows for 2D Plots
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
|
Pinging @veenstrajelmer. I wrote a wrapper around the code that was introduced in |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
That should be no issue I think, feel free to take it and adapt it as you wish. As written in the docstring of modplot.py, the code in that file is an improved version of https://github.com/kieranmrhunt/curved-quivers/blob/master/modplot.py (which has no licence), this again was based largely on matplotlibs streamplot functionality. I made the code in dfm_tools such that the diff was minimal with the matplotlib.streamplot code (at the time). I also hoped matplotlib would adopt it for that reason, as you probably read in the discussion in matplotlib/matplotlib#20038. So please ignore the dfm_tools license for this script, and feel free to use and adopt it as you please. |
beckermr
left a comment
There was a problem hiding this comment.
A bit more stuff on the class names. Looking good!
Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
|
@beckermr done merge away when ready. |
This PR introduces a new plotting feature:
curved_quiver, a method for drawing curved vector field arrows (streamlines with arrows) for 2D vector fields. This method provides a visually intuitive way to represent vector fields, combining the clarity of streamlines with the directionality of arrows.Motivation
curved_quiveruses streamlines with arrows, making vector field direction and magnitude easier to interpret.Attribution
curved_quiveris adapted from the Deltaresdfm_toolsrepository.Features
CurvedQuiverSet) with both the line and arrow collections for further manipulation or legend creation.Usage Example
Acknowledgement
Impact