-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Change how upper limit is taken for color_levels #4898
Conversation
Thanks @WesleyTheGeolien! Will have to update the related tests:
|
Also not totally following the correctness of this fix, wouldn't it be more correct not to round and to use |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4898 +/- ##
==========================================
- Coverage 88.48% 88.47% -0.01%
==========================================
Files 323 323
Lines 67640 67639 -1
==========================================
- Hits 59848 59846 -2
- Misses 7792 7793 +1 ☔ View full report in Codecov by Sentry. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #4897
I believe that the offset is due to the N parameter in the
plotting.utils.color_intervals
code and how it is used if there is a clip.Because of the int(round(...)) we can end up with more values in the camp than the N parameter. So when a slice is taken we should use the
Len(cmap)
rather thanN
which introduces an offset iflen(camp) != N