Skip to content
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

Faster center transition for dark-centered diverging maps #50

Open
drscotthawley opened this issue Dec 5, 2022 · 1 comment
Open

Faster center transition for dark-centered diverging maps #50

drscotthawley opened this issue Dec 5, 2022 · 1 comment
Labels
colormap request New colormap idea or request

Comments

@drscotthawley
Copy link

Describe the colors you would like
I want 'bwr' only with black in the middle, i.e.. I want "dark mode bwr": Blue on one side, red on the other, black in the middle, but for a fairly narrow range in the middle.

I notice that all the light-centered diverging maps appear as if there is a "rapid" transition around the central value, whereas for the darker maps the central dark colors cover a might wider proportion of the colormap.

My collaborator hates all the white in this image and asked for a "dark mode", so I'm working on that.
Screen Shot 2022-12-05 at 5 50 58 PM

'redshift' has too much of the middle of the color range as near-black:
Screen Shot 2022-12-05 at 5 53 18 PM
I want the black to cover a more narrow range in the middle.

'guppy' seems to provide the most rapid transition of the dark-centered diverging colormaps, but I don't want purple in the middle. Most of my plot ends up looking purple (see screenshot below), whereas I'd rather have it mostly dark.
Screen Shot 2022-12-05 at 5 49 46 PM

Describe the colormap type

diverging

Describe any extra properties

I'm not sure how one gets colorblind-friendliness in a diverging map, but if possible, that'd be great!

Is your colormap request related to a specific application? Please describe.

Sure, see tokens_spectrogram_image() in my aeiou library.
I want to easily see at a glance the distribution of positive, negative, and "small" (near zero) values in a 2D array.

Additional context

screenshots above

@drscotthawley drscotthawley added the colormap request New colormap idea or request label Dec 5, 2022
@1313e
Copy link
Owner

1313e commented Jan 15, 2025

@drscotthawley,

hmm, to me, the second plot you posted with wildfire looks really good actually, when I compare it to the bwr plot above it.
I can see all elements in both plots.
The reason it becomes harder to see the red/blue parts that are very close to 0 (on the far right of your plots for example), is because they should be.
They differ very little from 0, and thus should be near-black.

So, I have a return question first: Are ALL non-zero values in this plot important to clearly visualize?
Basically, any value that is not zero should be clearly distinct from actual zero?
If so, I could make a different colormap or a function (that CMasher could benefit from), that combines two sequential (10, 90) colormaps with black in the center.
Your smallest non-zero values would then become 10% lightness, which is visually distinct from black (0 lightness).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
colormap request New colormap idea or request
Projects
None yet
Development

No branches or pull requests

2 participants