Skip to content

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

Closed
ebarcelosf wants to merge 0 commit into
matplotlib:mainfrom
ebarcelosf:main
Closed

ebarcelosf wants to merge 0 commit into
matplotlib:mainfrom
ebarcelosf:main

Conversation

@ebarcelosf

@ebarcelosf ebarcelosf commented Oct 20, 2024 •

Copy link
Copy Markdown

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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.

@timhoffm timhoffm left a comment •

Copy link
Copy Markdown
Member

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

Development

Successfully merging this pull request may close these issues.

2 participants