-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX colorbars for Norms that do not have a scale. #16392
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 colorbars for Norms that do not have a scale. #16392
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16392 +/- ##
==========================================
- Coverage 80.85% 80.85% -0.01%
==========================================
Files 307 307
Lines 75745 75754 +9
Branches 9690 9693 +3
==========================================
+ Hits 61245 61250 +5
- Misses 11961 11964 +3
- Partials 2539 2540 +1
Continue to review full report at Codecov.
|
e175ffc
to
6331db8
Compare
There are multiple PRs out fixing various portions of the I think it would be helpful to take a step back and rework the entire machinery at once rather than piecemealing it together. |
This is orthogonal to whether the norm is correct or not, and this basically will be the system in place once the norm is sorted out. So I agree that the image test will need to change again, but I think this small change has more chance of getting in and affects other norms rather urgently. So I'd argue thats worth the extra image in the repo. |
We could also just take it on faith (aka local manual testing) that the new approach is better (after all we've been doing "fine" (or not so fine...) without a proper test for years now), push this first fix without the baseline image test, and put a proper test once everything is settled. |
6331db8
to
e23338f
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.
modulo making _scale
-> __scale
to make it more private (to make sure it does to leak)
I don't think we have double-underscore prefixed things anywhere in mpl, why would this one need to be more private? |
paranoia |
e23338f
to
0e24001
Compare
I am ambivalent towards whether its |
I actually prefer single underscore quite strongly here; I don't want to start creating "two levels" of private attributes and give the impression that some (single-underscore) private attributes are "more ok" to use as semi-public API than others (double-underscore), nor do I want to have mass-PRs replacing single underscores by doubles... |
I didn't really understand the argument for two underscores, but just did as @tacaswell suggested. Suggest he engages with you on this ;-) |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
…3.2.x Backport PR #16392: FIX colorbars for Norms that do not have a scale.
Note that |
PR Summary
If a norm that did not have a corresponding scale is used, then the colorbar was not working. This PR (thanks @dstansby) now keeps track of the scale associated with the colorbar and if it is "manual" then falls back to the manual method of creating the colorbar.
Replaces #16286
Closes #16280
Note there are still issues with SymLogNorm, but this fix is regardless of that.
PR Checklist