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

[BUG] zmin and zmax not working in imshow for 2d data #1931

Closed
emmanuelle opened this issue Nov 27, 2019 · 2 comments · Fixed by #1981
Closed

[BUG] zmin and zmax not working in imshow for 2d data #1931

emmanuelle opened this issue Nov 27, 2019 · 2 comments · Fixed by #1981
Assignees
Milestone

Comments

@emmanuelle
Copy link
Contributor

See for example

import plotly.express as px
import numpy as np
img = np.random.random((10, 10))
px.imshow(img, zmin=0.3, zmax=0.7)

I think this is because the Heatmap trace uses instead the range_color argument which was quite introduced quite late in the process. It's easy to fix, we just have to decide first if the API is ok as it is.

@emmanuelle emmanuelle added this to the v4.3.1 milestone Nov 28, 2019
@nicolaskruchten
Copy link
Contributor

Conclusion from discussion: we should continue to use range_color if provided, but if it isn't, we insert zmin and zmax in its place.

@emmanuelle emmanuelle self-assigned this Dec 5, 2019
@emmanuelle
Copy link
Contributor Author

So of course it's a bit more complicated than I originally thought because in the coloraxis if you give cmin you must also give cmax (I don't see why, btw). Working on it!

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 a pull request may close this issue.

3 participants