-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
red/green scatter plots. Colorblindness friendlyness in Documentation #5435
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
Comments
I agree with you an it would be great to get a pull request fixing this.
|
I'd like to tackle this. I've identified several plots that need changes to be colorblind friendly. |
I can do human testing here. |
It would be nice if we could use |
I think |
https://github.com/matplotlib/matplotlib/pull/4707/files#diff-893cf0348279e9f4570488a7a297ab1eR774 well it's not hard. but @GaelVaroquaux doesn't like including colormaps it
8000
seems ;) |
I've included a few problem plots that I have updated manually to emulate Matplotlib's new colormap, I am using the Firefox extension, Colorblind Design to view the images with colorblind simulator. You may also upload images here to view without an extension. Colorblind Friendly Version viewed normally: Colorblind Friendly Version viewed with Deuteranopia (most common): Colorblind Friendly Version viewed with Tritanopia: Colorblind Friendly Version viewed with Protanopia: Colorblind Friendly viewed normally - (this one was tough because of the number of colors needed, any color advice is welcomed): Colorblind Friendly Version viewed with Deuteranopia (most common): Colorblind Friendly Version viewed with Protanopia: Colorblind Friendly Version viewed with Tritanopia: Let me know if you agree with the style and process of manually updating colors. |
I really like the new versions |
@johannah : could you please reference the PR in this issue. Thanks! |
Good job! |
For ease of reuse and consistency, what are your opinions about defining styles somewhere globally and then import them in the examples? I am thinking about something like |
For ease of reuse and consistency, what are your opinions about
defining styles somewhere globally and then import them in the
examples?
I think that we need to wait a bit for the evolutions of matplotlib. It's
getting better and better for these problems. And maybe their current
evolutions on the defaults will help.
|
The matplotlib default are now colorblind friendly, if I understand correctly (see #16808). |
The following examples still display RGB - like colormap
Contributors willing to address this issue, please, offer one example per pull request. Thanks! |
I am currently working on the Adjustment for chance in clustering performance evaluation example in #23708. It would be natural to make the modifications there. I use the default |
... not really... :) ... sorry ... but you might want to have a look at #5555, it contains some examples of acceptable colormaps. |
For the line plots, that need more than the 3 default colors (blue, orange, red), the fourth color is green with the default color map of matplotlib Two options:
import matplotlib.style as style
style.use("seaborn-colorblind") Or you could do both at the same time, as was done in #23708. https://scikit-learn.org/dev//auto_examples/cluster/plot_adjusted_for_chance_measures.html Personally, I like the colors of the default color map a bit better than the seaborn scheme, I think adding markers should be enough in most cases on line plots. For other kinds of plots (e.g. scatter plots or heat maps) then we might need to find solutions on a case by case basis. I think that for heat maps, I think the |
I'm looking at Empirical evaluation of the impact of k-means initialization |
All the examples needing reworking have been modified. |
I noticed this while reading the documentation on SVMs, but it might also be a problem on other pages.
The plots on that documentation page make heavy use of red and green to separate different types of classes in the scatter plot.
Given that red/green is the color combination that is the most common colorblindness i consider this a very bad choice.
The text was updated successfully, but these errors were encountered: