Plotly.py: Annotated heatmaps: font colour blends with the colour of the square when using zmin and zmax

Created on 12 Feb 2020  路  6Comments  路  Source: plotly/plotly.py

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

bug figure_factory

All 6 comments

Thanks @PlatonB this is indeed a bug.

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

image

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

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/

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

I have submitted a PR, (this is my first one), not sure why the build doc requirement failed https://github.com/plotly/plotly.py/pull/2892

Was this page helpful?
0 / 5 - 0 ratings