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
Correctly handle data values <= 0 on a log scale #5549
Comments
Taking a quick look at this, the problem is definitely because the computed start for the range is NaN. I remember there was code ( The best thing to do would be to set the minimum data value to the the minimum value that is still > 0. But the min data value is saved into the I want to try out a few things to see what would be the best solution. @bryevdv @StevenCHowell do you think it is worth it to first add back the hotfix? I could make that small PR tonight and then figure out a better way to fix it. Also, the workaround now would be to supply a range start and end. |
@clairetang6, for the hotfix, setting it to 1 will obviously create other problems (typically my data ranges from 0 to 0.3 ish). As you say, something more like the following would be more appropriate:
I don't think there is a rush to patch this, just to have to return to it later. Did you see issue #5550? Perhaps consider this as well while trying things as it is closely related. |
This is a continuation from issue #5389, partially adressed by PR #5477. There persists an issue where negative data is not handled correctly. All data <= 0 should be discarded before generating the plot.
As is, if
values = np.linspace(-0.1, 0.9), a JS error complains that it "could not set initial ranges", probably because
log(n)for
n<=0` is not defined.The text was updated successfully, but these errors were encountered: