-
Notifications
You must be signed in to change notification settings - Fork 988
Add the colorblind friendly Okabe-Ito color palette #2108
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
base: develop
Are you sure you want to change the base?
Add the colorblind friendly Okabe-Ito color palette #2108
Conversation
|
It would be nice to set this palette as the |
|
Thanks for opening this; I'll take a proper look at the weekend (ping me if I forget). We should also consider an alternative system of default styles (colours and markers and dashes etc.) to make it easier to make colorblind friendly plots (and black-and-white printable plots). |
|
I started from this answer on StackOverflow for colorblind accessible colors in R. It has some interesting links to blogs and papers. https://stackoverflow.com/questions/57153428/r-plot-color-combinations-that-are-colorblind-accessible Regarding the code change, should the property be renamed to |
|
The second is probably preferable, then may or may not add one with a pre-set number of colours. The Cividis provision is a good example to follow:
|
|
@VisualMelon have you had time to look at it? |
|
Thanks for the reminder, will try to do so today. |
|
Thanks for this PR, I think this would be a very valuable addition! As far as I understand, the Okabe-Ito color palette is meant to visualize distinct categories, rather than continuous data. In fact, for continuous data, we do have some color palettes which are supposed to be color-blind-friendly (Viridis is the default, and we also have Cividis). I think the peaks-based examples are more suited for continuous color palettes. For a category-based color palette like this, maybe a BarSeries-based example would be more appropriate? I am also not sure if Okabe-Ito would be the best color palette to use as the default palette. The first color of Okabe-Ito is just plain black, which I think might not be ideal whether you are color-blind or not. |
Completely agree, meant to suggest something a bit more ambitious (usual thing of me dumping ideas in posts as they occur to me rather than opening a new thread): it would be nice for there to be a way to change the default colours/markers for a plot more easily, e.g. so that you can swap out the existing defaults for printer/colour-blind friendly defaults. It looks like it's actually already easy to change the @WimLeflere does it make sense for the colours to be interpolable? If so, should probably have an API more like Cividis/BlackWhiteRed (taking a number-of-colours parmeter); if not, I think it's fine as is, but I'd agree with @Jonarw that something with different colours between series would make more sense as an example, e.g. a set of line series with the |
|
I've updated the example to use line series. Interpolation works OK, but I prefer the default behavior of the different line types. |
…orblind-friendly-palette # Conflicts: # CHANGELOG.md
Checklist
Changes proposed in this pull request:
Add the colorblind friendly Okabe-Ito color palette.
Based on the paper: "How to make figures and presentations that are friendly to Colorblind people"
Masataka Okabe - Kei Ito (2008)
https://jfly.uni-koeln.de/color/
@oxyplot/admins