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

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

Merged
merged 5 commits into from
Oct 30, 2018

Conversation

jonmmease
Copy link
Contributor

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 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
@jonmmease
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants