FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

FIX: Handle masked arrays for RGBA input with ScalarMappables by greglucas · Pull Request #26096 · matplotlib/matplotlib · GitHub

Repository navigation

FIX: Handle masked arrays for RGBA input with ScalarMappables - #26096

Merged
rcomer merged 1 commit into
matplotlib:mainfrom
greglucas:sm-masked-rgba
Jun 10, 2023
Merged

rcomer merged 1 commit into
matplotlib:mainfrom
greglucas:sm-masked-rgba

Conversation

Copy link
Copy Markdown
Contributor

PR summary

Currently, the mask is ignored if a user passes in RGB(A) input arrays. This sets the alpha channel to 0 when any RGB(A) input is masked. This is relevant for RGB(A) data being used with pcolormesh. xref: SciTools/cartopy#2166 where it will simplify downstream accounting for masks and alpha.

PR checklist

greglucas added this to the v3.8.0 milestone Jun 9, 2023
greglucas requested a review from rcomer June 9, 2023 01:48

tacaswell 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This needs an API change note.

I'm sure we have at least one user who is relying on the mask being ignored!

I do not think this needs a deprecation cycle (as I suspect "just document it" was to avoid fixing a bug).

This sets the alpha channel to 0 when any RGB(A) input is masked.

Copy link
Copy Markdown
Contributor Author

👍 Added a change note now.

rcomer 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you for doing this @greglucas!

I have also verified that it enables the hoped for simplification of my Cartopy branch.

rcomer merged commit 5258ffc into matplotlib:main Jun 10, 2023
greglucas deleted the sm-masked-rgba branch June 10, 2023 12:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL