FIX: Handle masked arrays for RGBA input with ScalarMappables#26096
Merged
Conversation
tacaswell
requested changes
Jun 9, 2023
tacaswell
left a comment
Member
There was a problem hiding this comment.
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.
Contributor
Author
|
👍 Added a change note now. |
tacaswell
approved these changes
Jun 9, 2023
rcomer
approved these changes
Jun 10, 2023
rcomer
left a comment
Member
There was a problem hiding this comment.
Thank you for doing this @greglucas!
I have also verified that it enables the hoped for simplification of my Cartopy branch.
2 tasks
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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