Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Fix rectangle and hatches for colorbar#23684
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
This fix seems correct to fix the shape bug. However, I'll block because It seems better to just leave hatching completely broken, for the horizontal case at least, rather than fix it for a 3.6 with an off-by-one bug? I appreciate the off-by-one bug is in the semi-working vertical colorbar as well, and agree that they both need to be fixed. If anything, I'd remove the hatching completely from the colorbar for 3.6 until there is a proper fix.
As per comment in the original issue if this fixes cbars without extends then I withdraw my objection. Obviously we should fix the extends but this is an improvement. I'd add a test with no extends |
Problem just with extends. This fixes non extend cbars properly
5aaf547
to6322731
CompareI've fixed the extends as well now. |
def test_colorbar_contourf_extend_patches(): | ||
params = [ | ||
('both', 5, ['\\', '//']), | ||
('min', 7, ['+']), |
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.
This may seem stupid, but this did actually break at one stage as hatches wasn't extended enough.
cs = ax.contourf(x, y, z, levels, hatches=hatches, | ||
cmap=cmap, extend=extend) | ||
fig.colorbar(cs, ax=ax, orientation=orientation, fraction=0.4, | ||
extendfrac=0.2, aspect=5) |
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.
"Oversized" colorbar so that hatches are visible.
Moved to 3.6.1 since this is a bug fix, even if its an old bug? |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I'll try to update this over the weekend. Had forgotten about the comments... |
6322731
tod472042
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
d472042
tof521589
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
f521589
to9576ab3
Compare…684-on-v3.6.xBackport PR#23684 on branch v3.6.x (Fix rectangle and hatches for colorbar)
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Closes#23456.
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).