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
Heatmap has a build-in Divide by zero bug #2072
Comments
You can't plot zero on a log axis: what sort of output are you expecting? We should probably detect this and throw a more useful exception. |
You indeed can't plot 0 on a log. but it can have 0 if the axis is not a log axes. I just expect it to handle it a little better. Because it is possible and not uncommon to be able to switch between log and non-log axes with the press of a button. For it to break the moment you switch is not desired. I would expect it to check for 0 and maybe change it slightly so the calculation does not go into infinity. |
In this case I was trying to use a heatmapseries to display the density of a scatterseries. The scatterpoint can be so spread out that it sometimes needs the option to switch the axes to log axes. |
I'd have thought you'd have to recalculate the density map when changing the axis (and so compute new bounds in the log space), otherwise the alignment will necessarily be wrong. I can't really think what the correct behaviour could possibly be for this beside throwing or plotting nothing, but if you have a mock-up showing what you expect please feel free to share it. |
I think you are right on that part now that I think about it some more, Ill have to figure out why my code outputs a minimum X of 0 in log space. Because the spacing and density would indeed for sure be different in log space |
It also seems that just adding a color axis prevents the scatterSeries from properly showing its non selected points, which is kinda weird. The heatmapseries unfortunately needs it. |
Re. ScatterSeries, I can't remember exactly what was going on, but that sounds like it's related to #1963 |
Steps to reproduce
Platform: Windows
.NET version: 7.0
Oxyplot verion: 2.1.2
Expected behaviour
Plot heatmap in log scaling
Actual behaviour
Divide by zero and crash plot with infinite width because if axis is logarithmic: right and top are log(x1/x0)
The text was updated successfully, but these errors were encountered: