Skip to content

Add a colorblind friendly heatmap. #2871

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

Merged
merged 5 commits into from
May 3, 2014

Conversation

chebee7i
Copy link
Contributor

@chebee7i chebee7i commented Mar 5, 2014

Here's a colorblind friendly heatmap from Wistia:
http://wistia.com/blog/heatmaps-for-colorblindness

I made it available under the name 'wistia'. You can see how it compares to similar colormaps here:
download

Aside: It looks like many of the colormaps in _cm.py have "meta" information specifying what they were designed for. Perhaps this information should make its way into the colormap class, so that users could query the colormap for it?

@tacaswell tacaswell added this to the v1.4.0 milestone Mar 6, 2014
@tacaswell
Copy link
Member

👍 from me.

@efiring
Copy link
Member

efiring commented Mar 6, 2014

We need to be sure there is no copyright or license problem.
Also, the map seems to have very little dynamic range--less than the single color or gray maps.

@pelson
Copy link
Member

pelson commented Mar 6, 2014

Also, the map seems to have very little dynamic range--less than the single color or gray maps.

Yes, I agree. For me this continuous colormap it is as effective as choosing 2 discrete colours. I'm not confident I could infer anything other than boolean values from this scale...

@tacaswell
Copy link
Member

@efiring On consideration, I am now too worried about licensing issues.

@tacaswell tacaswell modified the milestones: v1.5.x, v1.4.0 Mar 6, 2014
@chebee7i
Copy link
Contributor Author

chebee7i commented Mar 6, 2014

@pelson What do you think about the heatmaps shown on the link I provided? I am certainly able to infer more than boolean values out of it. Or do you mean that it is only useful as a discrete map? For the small dynamic range, I think that expected given that this is meant to be functional for people with the deuteranopia form of colorblindness.

As for copyright, I'm no expert, but I'm amused that copyright is even a concern here. I could change one of the colors just slightly but in a way that the eye probably would not notice. The original one was also not continuous.

Should we just write a script to generate all possible (equally spaced) interpolated colormaps on 5 colors and declare all of them to be in the public domain except the ones that have prior copyrights? Ignoring opacity, there are at most (256^3)^5 of them...and in practice far fewer, due to degeneracy. They even have a nice visual tool to help out: http://wistia.com/colortest

@chebee7i
Copy link
Contributor Author

chebee7i commented Mar 6, 2014

Here is another demonstration of the colormap. These are per-player heatmaps, each representing when a player was logged into an online game within 24-hour period, sampled every 15 minutes:

heatmaps

Independent of any other copyright issues, the name should probably be changed to something other than 'wistia'.

@jringenberg
Copy link

@chebee7i Well, I think it would be awesome if it was called "Wistia," though I understand if that makes no sense. Don't worry about copyright or tweaking hex values, Wistia is collectively delighted to see others using the color-blind-friendly heatmap palette. 👍

@chebee7i
Copy link
Contributor Author

Great. Thanks for chiming in @jringenberg.

@chebee7i
Copy link
Contributor Author

Ping? This is ready for acceptance or rejection. It just needs a decision.

@tacaswell
Copy link
Member

@jringenberg Is there any way we could get a more official blessing to use your color map? Your company might be cool with it now, but could always be bought by Oracle.

Could you published publicly (or just pointed me at where this is already done) the color map (with enough detail to reproduce it) with a permissive license (BSD or more permissive)?

That is what it would take to get me to push the green button, if others feel differently I will not block it.

@jringenberg
Copy link

@tacaswell @chebee7i Sorry this took awhile, I just put it up here: https://github.com/wistia/heatmap-palette

@chebee7i
Copy link
Contributor Author

chebee7i commented May 2, 2014

I updated the color values. The test failure seems unrelated. Can anyone restart it?

@tacaswell
Copy link
Member

Can you add a note with the link that it is MIT licensed?

This should also get an entry in the CHANGELOG and an entry in whats_new.rst (as this is a cool new feature that should be advertised).

I think at this point this is down to housekeeping. (don't worry about that test fail).

@tacaswell tacaswell modified the milestones: v1.4.0, v1.5.x May 2, 2014
@chebee7i
Copy link
Contributor Author

chebee7i commented May 2, 2014

Let me know if anything else needs to be added. Otherwise, I think its ready.

@tacaswell
Copy link
Member

The branch needs to be re-based now (it won't merge cleanly). The problem in conflicts in CHANGLOG and/or whats_new.rst.

@chebee7i
Copy link
Contributor Author

chebee7i commented May 2, 2014

Should be good now (hopefully). 🎱

@tacaswell
Copy link
Member

The 3.2 failure seems to be an intermittent font issue....

👍 to merge from me if @pelson and @efiring are happy.

@efiring
Copy link
Member

efiring commented May 3, 2014

Fine with me.

efiring added a commit that referenced this pull request May 3, 2014
Add a colorblind friendly heatmap.
@efiring efiring merged commit ab3aa58 into matplotlib:master May 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants