Skip to content
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

Make colorbar boundaries work again #21913

Merged
merged 1 commit into from Dec 10, 2021

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Dec 10, 2021

PR Summary

colorbar has a boundaries kwarg, which is supposed to make the colorbar boundaries hard coded. This was broken by the colorbar rewrite.

I actually think this kwarg is a bit of an abomination from a data visualization point of view; if you want discrete colors that is the job of the norm, not the colorbar. But I also admit we can't break it.

Added a new test so we don't break it wantonly again.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@jklymak jklymak added this to the v3.5.1 milestone Dec 10, 2021
@jklymak jklymak added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Dec 10, 2021
@jklymak jklymak force-pushed the fix-colorbar-allow-boundaries branch from d9b1945 to 31efd72 Compare December 10, 2021 10:52
@QuLogic QuLogic merged commit 5cd6d69 into matplotlib:main Dec 10, 2021
@lumberbot-app
Copy link

lumberbot-app bot commented Dec 10, 2021

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.5.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -m1 5cd6d69da4db8960c7d2475224a377ce4418efc0
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #21913: Make colorbar boundaries work again'
  1. Push to a named branch:
git push YOURFORK v3.5.x:auto-backport-of-pr-21913-on-v3.5.x
  1. Create a PR against branch v3.5.x, I would have named this PR:

"Backport PR #21913 on branch v3.5.x (Make colorbar boundaries work again)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@QuLogic
Copy link
Member

QuLogic commented Dec 10, 2021

This conflicts with #21137 (on main but not in v3.5.x), and I'm not sure exactly how to fix it, so I'm going to bump this to 3.5.2.

@QuLogic QuLogic modified the milestones: v3.5.1, v3.5.2 Dec 10, 2021
@QuLogic
Copy link
Member

QuLogic commented Dec 10, 2021

Actually, I just looked closer at what that did and I'm just going to backport both at the same time.

@QuLogic QuLogic modified the milestones: v3.5.2, v3.5.1 Dec 10, 2021
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Dec 10, 2021
QuLogic added a commit that referenced this pull request Dec 11, 2021
…3.5.x

Backport PR #21913 on branch v3.5.x (Make colorbar boundaries work again)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: color/colorbar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Matplotlib is unable to apply the boundaries in the colorbar after updating to 3.5.0
3 participants