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
The colormap/tick locations within the colorbar are not being updated properly with a SymLogNorm on master. I think this is different than #16269 because it is actually creating the colorbar, just a wrong one.
Hmm, well not surprising. I guess the hand-made axes handling that used to be in colorbar did something special with SymLogNorm. This comes back to the issue that @anntzer has that scales and norms are not terribly different. I suspect the correct fix is for someone to gin up a SymLogScale if it doesn't already exist and get that to work and then let it be applied to colorbars. Or special case SymLogNorm in colorbar, but thats a last resort IMHO.
@dstansby, out of curiosity how did you bisect that so fast? When I do a git bisect and rebuild with python -mpip install . it takes quite a while to rebuild mpl each time. Is there an automated way that you've got to make bisecting faster?
Some more tricks (everything here assumes you're in a -e install):
Even if you need to rebuild c extensions you can just do python setup.py build_ext --inplace which will just rebuild the extensions and skip the rest.
ccache (https://ccache.dev/) really helps too (because if you're bisecting even only once in a while, you'll be compiling the same files again and again).
So it seems that SymLogNorm itself is also broken, so perhaps not such a bad thing that its colorbar doesn't work: #16376 But of course we should fix these things ASAP.
@greglucas Using pip install -e . is one way to make it faster (as you don't have to actually re-install if only the python changes) and the other is to use ccache so that the c-extensions build almost instantly.
Thanks for the helpful hints on commands! A quick search through the docs doesn't indicate anything telling me about ccache and the wording is pretty vague around the pip install -e . command. I think this would actually be helpful for other new contributors getting started and bisecting, so I will try and look into adding it somewhere in the docs.
Activity
jklymak commentedon Jan 21, 2020
That example is pretty broken anyways.
Colorbars changed to behave more like normal axes, though I thought they changed in 3.1. Can you bisect this and see what commit made this change?
I'm ill-disposed to
SymLogNorm, but maybe its an easy fix.dstansby commentedon Jan 21, 2020
@jklymak good job I'm well-disposed 😉 - I'll try to look into this as I think I have the same issue too!
dstansby commentedon Jan 21, 2020
Bisects to dc51a68
jklymak commentedon Jan 21, 2020
Hmm, well not surprising. I guess the hand-made axes handling that used to be in colorbar did something special with
SymLogNorm. This comes back to the issue that @anntzer has that scales and norms are not terribly different. I suspect the correct fix is for someone to gin up a SymLogScale if it doesn't already exist and get that to work and then let it be applied to colorbars. Or special case SymLogNorm in colorbar, but thats a last resort IMHO.ENH: make contour colorbars behave like other colorbars
greglucas commentedon Jan 22, 2020
@dstansby, out of curiosity how did you bisect that so fast? When I do a git bisect and rebuild with
python -mpip install .it takes quite a while to rebuild mpl each time. Is there an automated way that you've got to make bisecting faster?jklymak commentedon Jan 22, 2020
You don’t need to pip install each time if you don’t need to rebuild any of the c code. (And you’ve used pip install -e)
anntzer commentedon Jan 22, 2020
Some more tricks (everything here assumes you're in a -e install):
python setup.py build_ext --inplacewhich will just rebuild the extensions and skip the rest.jklymak commentedon Feb 1, 2020
So it seems that
SymLogNormitself is also broken, so perhaps not such a bad thing that its colorbar doesn't work: #16376 But of course we should fix these things ASAP.tacaswell commentedon Feb 3, 2020
@greglucas Using
pip install -e .is one way to make it faster (as you don't have to actually re-install if only the python changes) and the other is to useccacheso that the c-extensions build almost instantly.greglucas commentedon Feb 3, 2020
Thanks for the helpful hints on commands! A quick search through the docs doesn't indicate anything telling me about
ccacheand the wording is pretty vague around thepip install -e .command. I think this would actually be helpful for other new contributors getting started and bisecting, so I will try and look into adding it somewhere in the docs.