You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now some color norms have accompanying scales, which allows their colorbars to have first-class scales. But some do not...
LogNorm: log
PowerNorm: no scale
TwoSlopeNorm: no scale
BoundaryNorm: shouldn't have a scale
Instead of inferring the first-class scale, I'd suggest we add a new property: norm._scale so that colorbar does not have to guess the scale. This should be a string so that it will only call registered scales, and it should be None when no scale is defined.
If its None, then colorbar will use the old default way of setting the scale. Otherwise it will set the scale using ax.set_yscale(norm._scale).
We probably don't want the user to set this - if they want to change the colorbar scale, they can simply use the normal ax.set_yscale directly.
I have a patch at https://github.com/anntzer/matplotlib/tree/_wip/scale-norm that provides a _make_norm_from_scale factory that converts Scales to Norms with that intent. I haven't PR'd it yet both because it's still incomplete and because it goes on top of the yet-to-be-merged #14916 :)
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Activity
anntzer commentedon Jan 30, 2020
I have a patch at https://github.com/anntzer/matplotlib/tree/_wip/scale-norm that provides a _make_norm_from_scale factory that converts Scales to Norms with that intent. I haven't PR'd it yet both because it's still incomplete and because it goes on top of the yet-to-be-merged #14916 :)
jklymak commentedon Jan 31, 2020
@anntzer Overall #14916 looks right to me, but I hvanet reviewed carefully yet. Please ping me if I don't by the end of the w/e?
github-actions commentedon Mar 30, 2026
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
anntzer commentedon Mar 30, 2026
Done in #16457 and followup PRs.