Skip to content

Feature: Add nan support for curved_quiver#676

Merged
cvanelteren merged 4 commits intomainfrom
fix/curved-quiver-nan-support
Apr 7, 2026
Merged

Feature: Add nan support for curved_quiver#676
cvanelteren merged 4 commits intomainfrom
fix/curved-quiver-nan-support

Conversation

@cvanelteren
Copy link
Copy Markdown
Collaborator

@cvanelteren cvanelteren commented Apr 7, 2026

Add nan support + tests for curved quiver.

EDIT: also threw in colorbar support natively.
Closes #675

…hard failures so vector fields with gaps still render cleanly. This updates the trajectory solver to stop gracefully at invalid samples, hardens arrow construction around masked endpoints, and adds regression coverage for both solver-level and plotting-level NaN cases.
…n to the plotting layer so NaN handling stays encapsulated where the trajectories are computed. The end-arrow path now uses the final streamline segment as its tangent, which removes the extra endpoint resampling and keeps the public plotting code out of the solver's internal control flow.
…trajectory result object instead of leaking tuple-shaped internal state into the plotting layer. This keeps endpoint direction and edge handling with the integration code, simplifies the renderer, and adds assertions that the solver now exposes the metadata the plot path actually consumes.
…when its streamline colors come from array data, so it behaves like the other color-mapped field plots. This adds the familiar colorbar arguments to the method signature, documents that they apply to array-valued colors, and verifies that the created colorbar is registered against the streamline LineCollection with the requested label.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 92.00000% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/axes/plot.py 68.75% 4 Missing and 1 partial ⚠️
ultraplot/axes/plot_types/curved_quiver.py 92.85% 2 Missing ⚠️
ultraplot/tests/test_plot.py 98.21% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@cvanelteren cvanelteren merged commit 61366b0 into main Apr 7, 2026
19 checks passed
@cvanelteren cvanelteren deleted the fix/curved-quiver-nan-support branch April 7, 2026 08:58
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.

NaN is not supported in curved_quiver

1 participant