-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Colorbar cleanup. #15982
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
Colorbar cleanup. #15982
Conversation
bb6187c
to
7890764
Compare
@@ -715,6 +715,33 @@ def add_lines(self, CS): | |||
#tlinewidths = [col.get_linewidth()[0] for lw in CS.collections] | |||
ColorbarBase.add_lines(self, CS.levels, tcolors, tlinewidths) | |||
|
|||
def update_normal(self, mappable): | |||
""" |
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.
I guess this needs some sort of test while we are here....
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.
Given that axes_grid1.colorbar is already deprecated, I would rather not bother...
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.
Oh I didn't catch that.
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.
Agree, these methods confused me when I first dug into the code, so any simplification is good. It looks like they were largely just there for axes_grid
May self-merge after CI resolving the conflict. |
Deprecate on_mappable_changed in favor of update_normal (they're the same now (except for a logging call) now that colorbars just use the norm of the mappable). Deprecate update_bruteforce in favor of update_normal -- it's not used anywhere except in axes_grid, but that's just because whoever introduced update_normal forgot to update axes_grid at the same time. axes_grid.colorbar is already deprecated but until its complete removal, we need to backport update_normal to it...
self-merge per above. |
Deprecate on_mappable_changed in favor of update_normal (they're the
same now (except for a logging call) now that colorbars just use the
norm of the mappable).
Deprecate update_bruteforce in favor of update_normal -- it's not used
anywhere except in axes_grid, but that's just because whoever introduced
update_normal forgot to update axes_grid at the same time.
axes_grid.colorbar is already deprecated but until its complete removal,
we need to backport update_normal to it...
PR Summary
PR Checklist