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

Colorblind-friendly decision regions #348

Merged
merged 4 commits into from
Mar 16, 2018
Merged

Colorblind-friendly decision regions #348

merged 4 commits into from
Mar 16, 2018

Conversation

rasbt
Copy link
Owner

@rasbt rasbt commented Mar 16, 2018

Description

Modification to the plot_decision_region function that makes it easier for color blind people to distinguish between the different decision regions by using the matplotlib 2.0 color panel and solid decision boundary lines.

Related issues or pull requests

Fixes #347

Pull Request requirements

  • Added appropriate unit test functions in the ./mlxtend/*/tests directories
  • Ran nosetests ./mlxtend -sv and make sure that all unit tests pass
  • Checked the test coverage by running nosetests ./mlxtend --with-coverage
  • Checked for style issues by running flake8 ./mlxtend
  • Added a note about the modification or contribution to the ./docs/sources/CHANGELOG.md file
  • Modify documentation in the appropriate location under mlxtend/docs/sources/ (optional)
  • Checked that the Travis-CI build passed at https://travis-ci.org/rasbt/mlxtend

@rasbt
Copy link
Owner Author

rasbt commented Mar 16, 2018

Below are two example plots. I think the "new" matplotlib default color palette is visually pleasing and according to Coblis, it might be more color blind-friendly. However, I think the transparency is still a bit of an issue with regard to color blindness; thus, adding solid decision boundary lines (in black) might help.

unknown-3
unknown-2

@coveralls
Copy link

coveralls commented Mar 16, 2018

Coverage Status

Coverage increased (+0.006%) to 91.732% when pulling 4883c12 on colorblind-palette into 46c3e02 on master.

@rasbt
Copy link
Owner Author

rasbt commented Mar 16, 2018

Just made the lines a bit thinner. I think this looks fine now :)
unknown-1

@jrbourbeau
Copy link
Contributor

I like the line idea! Was about to comment that a thinner line might look better, but it looks like you just updated to a thinner line 👍

@rasbt
Copy link
Owner Author

rasbt commented Mar 16, 2018

Thanks for the feedback! According to a conversation on twitter, the colors are also distinguishable now. I think this should be good to merge

@rasbt rasbt merged commit 62aea2a into master Mar 16, 2018
@rasbt rasbt deleted the colorblind-palette branch April 7, 2018 00:18
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.

None yet

3 participants