Skip to content

Annotated heatmaps: font colour blends with the colour of the square when using zmin and zmax #2187

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

Closed
PlatonB opened this issue Feb 12, 2020 · 6 comments · Fixed by #2921
Closed
Labels
bug something broken
Milestone

Comments

@PlatonB
Copy link

PlatonB commented Feb 12, 2020

Since there's no reaction to the new message in #1300, I'll write it as a separate issue.

Bug can be reproduced when using zmin and zmax arguments. Plotly 4.5.0.

from random import triangular
import plotly.figure_factory as ff

z = [[round(triangular(0.01, 0.1), 3) for j in range(10)] for i in range(10)]
ff.create_annotated_heatmap(z, colorscale='greens').show()
ff.create_annotated_heatmap(z, colorscale='greens', zmin=0, zmax=1).show()

Without zmin and zmax:
without_zmin_zmax

With zmin=0 and zmax=1:
with_zmin_zmax

@emmanuelle
Copy link
Contributor

Thanks @PlatonB this is indeed a bug.

@emmanuelle emmanuelle added this to the v4.6.0 milestone Feb 12, 2020
@emmanuelle emmanuelle added figure_factory bug something broken labels Mar 17, 2020
@nicolaskruchten nicolaskruchten modified the milestones: v4.6.0, v4.x Mar 31, 2020
@bensdm
Copy link

bensdm commented Sep 16, 2020

I have the same issue with colorscale='Rdbu' without zmin and zmax

image

@nicolaskruchten
Copy link
Contributor

Agreed, this is a bug, and is probably fixable in this repo rather than Plotly.js, for once :)

@bensdm
Copy link

bensdm commented Nov 11, 2020

Any update on this? should be quite easy to fix. Also was wondering why RdBu is in both sequential and diverging color scales https://plotly.com/python/builtin-colorscales/

@nicolaskruchten
Copy link
Contributor

No update, we'd be happy to accept a PR for it if it's easy :)

The RdBu inclusion in sequential was a mistake, as noted in the docs you linked:

image

@bensdm
Copy link

bensdm commented Nov 11, 2020

I have submitted a PR, (this is my first one), not sure why the build doc requirement failed #2892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants