Register more "clipped" color maps, use viridis_clip as default for level()#191
Merged
fs446 merged 8 commits intosfstoolbox:masterfrom Sep 24, 2025
Merged
Conversation
Member
Author
|
The clipped colors can be seen e.g. here: https://sfs-python--191.org.readthedocs.build/en/191/sfs.td.nfchoa.html For comparison, an older release: https://sfs-python.readthedocs.io/en/0.6.2/sfs.td.nfchoa.html For these time-domain plots, most of the area has very low level and therefore has the "under" color. I'm not sure yet whether that's a good thing or not. |
proposed alternative: - instead of having same alpha for both under and over we use individual color weights and alphas for the under/over color - by that the extreme colors can be better adapted towards the individual colormaps, for viridis and cividis to me this is not needed but - inferno, magma, plasma colormaps could then be handled much nicer, if people like to add them one day - the colorwarm URL link did not work, changed to an exisiting one
Member
Author
|
I have added a few commits with a new way to calculate the under/over colors. |
Member
|
Nice work, thank you very much! |
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.
This also changes "alpha" to a slightly more extreme value. We could tune this for each colormap individually.
Alternatively, we could also manually select "over" and "under" colors for each colormap.