-
Notifications
You must be signed in to change notification settings - Fork 317
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
fix(export_contours/f): support matplotlib 3.8+ #1951
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1951 +/- ##
========================================
Coverage 72.6% 72.6%
========================================
Files 257 257
Lines 57711 57812 +101
========================================
+ Hits 41927 42020 +93
- Misses 15784 15792 +8
|
c3c95ea
to
a9f7c94
Compare
* ContourSet.get_paths() returns one path per level * path may contain multiple disconnected components * walk contour components to determine connectivity
a9f7c94
to
cd4f58d
Compare
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.
Hey @wpbonelli, this looks good. Too bad about having to handle versions differently, but seems appropriate for now, at least until pre-matplotlib 3.8 is deprecated. Only real comment is the string check on the matplotlib version. We should keep our eyes out for a lightweight generic python package that can create contours from regularly and irregularly spaced data. I poked around but no luck.
5c23b57
to
5a41f5c
Compare
@langevin-usgs it looks like MPL uses contourpy, maybe we could drop down to that directly in the longer term? In the meantime, a patch release seems in order after this merges, for interim support for all MPL versions |
@wpbonelli, seems like considering contourpy for this in the future would be worth exploring, but not a high priority. Agree with a patch release. Thanks for fixing. |
* ContourSet.get_paths() returns one path per level * path may contain multiple disconnected components * walk contour components to determine connectivity
export_contours()
andexport_contourf()
for matplotlib 3.8+ compatverbose
flag toexport_contours()
to matchexport_contourf()
See this comment for context