Skip to content

Handle divergent colormaps and improve singular value handling in colorbars #28999

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

Closed
wants to merge 0 commits into from

Conversation

ebarcelosf
Copy link

@ebarcelosf ebarcelosf commented Oct 20, 2024

The updates made in the code improve handling of two key cases:

  1. Divergent Colormaps: When using colormaps like coolwarm or RdBu, singular values (where vmin == vmax) now collapse to the center, ensuring smoother transitions, addressing Tim's concern.
  2. Singular Norms Expansion: For non-divergent colormaps, the code automatically expands vmin and vmax if they are equal, avoiding abrupt changes and maintaining consistent behavior, without triggering warnings.

These changes enhance flexibility and consistency across different colormap types.
Helps with issue #26307

PR checklist

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your willingness to contribute. However, as stated, this is a difficult design decision and we need to discuss and agree on a way forward before jumping to an implementation.

Please share your thoughts and proposal in #26307 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for author
Development

Successfully merging this pull request may close these issues.

2 participants