-
Notifications
You must be signed in to change notification settings - Fork 219
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
Use colorblind-friendly colors in the scatter plots gallery example #1013
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
90585ad
Accessible colors for color blindness
vitorgt 2b235ea
change colors, add different symbols
vitorgt c6d0936
Merge branch 'master' into patch-1
michaelgrund 44d090b
Merge branch 'master' into patch-1
michaelgrund d1bafa1
remove style change; more opaque symbols
vitorgt 85611b2
move plot/scatter.py to symbols/scatter.py
vitorgt e20c030
Merge branch 'master' into patch-1
vitorgt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if these colors solve the problem (please correct me if I'm wrong). Maybe it would be better to select colors from cpts that really focus on the color blindness issue.
Here's a deuteranopia (green-blind) simulation of your example @vitorgt:
By the way, here's a nice article about the use (or misuse) of color in scientific visualization by Crameri et al.: https://www.nature.com/articles/s41467-020-19160-7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but colorblind friendly colorschemes are very limited, and transparency makes this case even worst, I've changed green to a grey, this change will produce greater differences on protanopia and deuteranopia, but purple will get closer to grey on tritanopia (the rarest of the three).
Everywhere i looked on how to choose colorblind friendly colors they say not to rely only color, but to create other ways to differentiate set, usualy changing marker. So i added this.
Also, i couldn't find colorblind friendly cpts on gmt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can try to increase the transparency slightly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, perhaps
transparency=50
gives a better result.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, @michaelgrund, "transparency makes this case even worst" means we sould remove transparency.
Like
transparency=90
or remove that line completely (which would be equal totransparency=100
(default)).Transparenncy makes it worst beacuse it blends the colors and changes their luminance when adding two or more symbols with equal or different colors, notting that color addition with colorblindness is a little bit tricky. That's why transparency should be avoided if we want it more coverage considering colorblindness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're getting a bit confused here.
transparency=0
means opaque whiletransparency=100
means invincible. We probably want to reduce transparency (i.e. increase opacity).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right @weiji14. I think we should not drop transparency here since it allows to deal with overplotting.