You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: floating-point artefacts in tick labels #7765
Thanks for the report! The default tickformat works fine, but ~r and some of the other d3-format specs show this behavior.
In this case the behavior is clearly a bug, since you didn't specify tick0 so it defaults to 0 therefore it's unambiguous that the tick should be exactly at zero. And we could make a narrow fix that says "if the tick value is close to tick0 (much closer than whatever we've calculated as dtick), set it to exactly tick0. That would cover the 99% use case.
The one case it wouldn't cover is if someone sets a nonzero tick0 but there's still a tick that should fall exactly on zero. Like tick0=1 and dtick=0.1. If we wanted to ensure we're robust in that situation, but still allow things that are not quite that to honor the user's intent like tick0=1.0001 and dtick=0.1, we'd need some sort of heuristic for how close to zero, as a fraction of dtick, counts as zero. One millionth? One billionth?
Thanks for the report! This does indeed look like a bug. Our team likely won't have time to address this for a while, but can prioritize a PR review if you want to look into it.
Description
Plotly shows a tick label of −0.0000000000000000888178, which is just silly.
Screenshots/Video
Steps to reproduce
https://codepen.io/Shack-1-Spoilage/pen/MYjdYoR