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.
The text was updated successfully, but these errors were encountered:
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 :)
Uh oh!
There was an error while loading. Please reload this page.
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 scaleTwoSlopeNorm
: no scaleBoundaryNorm
: shouldn't have a scaleInstead 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 beNone
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 usingax.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.The text was updated successfully, but these errors were encountered: