-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: make add_lines work with new colorbar #12461
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
Conversation
Huh, and here I am manually adding lines to the cbar axes with |
Well, except the subclass We could extend the API of You must have been bit by the 3.0 change, i.e. the colorbar no longer has native co-ordinates from 0 to 1, but rather from vmin to vmax.... |
Grrr, test failures are real, with the lines slightly extended a bit further into the lhs of the axes. I don't think either version is "wrong", and the PDFs are the same, so I'll upload the new images for this one. |
Added new test image to test that the lines are added properly to a colorbar. |
@anntzer are you proposing we do that here? I was just going for the minimal change to fix the code. If we want to make a 3.1 upgrade, I'd be all for that. Would appending the collection to |
I think this can go in as is for now (well I didn't review it carefully, but looks fine). |
?? #12380 is for |
I think the old one is wrong, actually. The LHS shows some mixing of the line and the colorbar below, whereas the new one goes right to the edge line. |
Yeah, I don't quite understand from the code why that is the case, however... Before the xaxis went from [0, 1], now it goes from [vmin, vmax], and this PR just redraws across those limits for both cases. Maybe something funky about axes that go from [0, 1]? |
Oh sorry yes I got PRs mixed up. I guess yes you may as well use hlines/vlines here then... |
…461-on-v3.0.x Backport PR #12461 on branch v3.0.x (FIX: make add_lines work with new colorbar)
PR Summary
Closes #12458
See below for a less pathological example...
cbar.add_lines
was not operational after new colorbar changes in 3.0.0.Before
After
Before
After
PR Checklist