Thanks to visit codestin.com
Credit goes to github.com

Skip to content

not support extremely small number #7426

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

Open
missBlueWhite opened this issue May 27, 2025 · 3 comments
Open

not support extremely small number #7426

missBlueWhite opened this issue May 27, 2025 · 3 comments
Labels
bug something broken P3 backlog

Comments

@missBlueWhite
Copy link

When my normalized color scheme values are extremely small (down to 5 decimal places), this configuration becomes invalid.
Image

Image

@gvwilson gvwilson added bug something broken P3 backlog labels May 28, 2025
@gvwilson
Copy link
Contributor

thanks for the bug report @missBlueWhite - when you say "becomes invalid", what error message are you seeing? and which version of plotly.js are you using? thanks - @gvwilson

@alexcjohnson
Copy link
Collaborator

I'm guessing you're creating a heatmap and/or a heatmap-colored contour map. In these modes I believe we convert the colormap to 256 discrete colors, so the way you're generating your colormap all of these except the final color get collapsed into one.

The standard way to use colormaps is to scale the values up so that instead of 0-0.00009 you use the full 0-1 range, then map these to your data using the zmin and zmax attributes (or cmin and cmax in some contexts). Note that the strategy you used here would throw an error if you tried to use it with data outside the 0-1 range.

@TBusan
Copy link

TBusan commented May 30, 2025

感谢您的错误报告 - 当您说“变得无效”时,您看到的是什么错误消息?您使用的是哪个版本的 plotly.js?谢谢-

Image
As shown in the figure, the image contains only two colors: red and purple, while the other colors are not displayed. The z-values provided range from 200 to 3,000,000. When setting the colorScale as described above, only purple and red appear, and the other colors fail to render.

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

No branches or pull requests

4 participants