-
Notifications
You must be signed in to change notification settings - Fork 15
Add curved_quiver
— Curved Vector Field Arrows for 2D Plots
#361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_quiver
uses streamlines with arrows, making vector field direction and magnitude easier to interpret.Attribution
curved_quiver
is adapted from the Deltaresdfm_tools
repository.Features
CurvedQuiverSet
) with both the line and arrow collections for further manipulation or legend creation.Usage Example
Acknowledgement
Impact