-
Notifications
You must be signed in to change notification settings - Fork 17
Added utils function for 0-transparent cmaps #302
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
Added utils function for 0-transparent cmaps #302
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #302 +/- ##
==========================================
+ Coverage 80.18% 80.35% +0.17%
==========================================
Files 11 11
Lines 1736 1746 +10
==========================================
+ Hits 1392 1403 +11
+ Misses 344 343 -1
|
Amazing! Ready for review? |
Added the function @LucaMarconato @giovp. Probably best to add it to one of the notebooks to illustrate usage - which one do you think would be best? |
Thanks! I am working on the Visium HD notebook right now, so I can add it there 😊 |
for more information, see https://pre-commit.ci
…alpha=0' of github.com:scverse/spatialdata-plot into feature/issue242-modify-colormap-so-that-0-values-have-alpha=0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Maybe one consideration is to add a parameter that automatically does this for the user e,g, zero_transparent
, but this could be added in a different PR. Also this PR does make it a bit more difficult for view configurations as we are dealing with different alpha values. May have to think of serialization of the colormap values.
Yeah, based on #242 we decided not to include it as an argument but like this. But I agree, eventually, we should probably just serialise the data. I think ggplot f.e. also does it like this when generating the plot |
Note: the only existing utils function was using a different testing pattern, which I now aligned with the usual one. But therefore there's an additonal image in this PR