Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix reversed color scale issues in annotated heatmap figure factory #1251

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
jonmmease merged 5 commits into master from inguar-patch-1
Oct 30, 2018

Conversation

@jonmmease
Copy link
Contributor

@jonmmease jonmmease commented Oct 30, 2018

Builds on #867. Thanks for getting this started @inguar!

In addition to the commit from #867:

  • Merge in current master
  • Fixes existing tests
  • Refactors legacy text color selection logic a little to make intention a little more clear
  • Adds fix error in legacy text color selection logic when a custom colorscale is provided

inguar reacted with thumbs up emoji
inguar and others added 5 commits October 26, 2017 17:05
Currently, `reversescale` does not get included into the `trace` dictionary. Therefore, color scale doesn't change when setting it to `True` (although the color of annotations gets inverted).
 - pull out black/white colors as variables
 - Add should_use_black_text function to hold color contrast equation
Copy link
Contributor Author

Display of the figure in the new test_annotated_heatmap_reversescale test:

newplot 69

@jonmmease jonmmease merged commit 32b6701 into master Oct 30, 2018
@jonmmease jonmmease deleted the inguar-patch-1 branch October 31, 2018 00:23
michaelbabyn pushed a commit to michaelbabyn/plotly.py that referenced this pull request Dec 22, 2018
...lotly#1251)
* Fix reversed color scale in annotated heatmap. Currently, `reversescale` does not get included in the `trace` dictionary. Therefore, the color scale doesn't change when setting it to `True` (although the color of annotations gets inverted).
* Small refactor to pull out black/white colors as variables and add should_use_black_text function to hold color contrast equation
* Handle reversescale when passing in a custom colorscale
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

v3.4.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /