-
Notifications
You must be signed in to change notification settings - Fork 95
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
The first and last bins of histograms are not drawn - FIXED #80
Comments
Histogram returned wrong indices for non equidistant bins. Partial fix for #80
I got a partial fix, but there is a deeper problem with rendering histograms with non-equidistant bins. The dataset interface for Histograms returns the center and therefore the renderer cannot reproduce the actual binning. This will probably need some deeper api changes to get it right. Your sample looks pretty equidistant, so if your usecase is equidistant use the min/max/nBins constructor which will give you an equidistant Histogram which internally works a little different. |
Histogram returned wrong indices for non equidistant bins. Partial fix for #80
Histogram returned wrong indices for non equidistant bins. Partial fix for #80
Histogram returned wrong indices for non equidistant bins. Partial fix for #80
Histogram returned wrong indices for non equidistant bins. Partial fix for #80
Histogram returned wrong indices for non equidistant bins. Partial fix for #80
Hi @karlduderstadt, just as an update: The issue of 'half-a-bin-shift' seems to occur only for the non-equidistant binning option which is a bit special. The latter does not (yet) provide the necessary API info of where to draw the specific edges and unfortunately, this cannot be automatically determined. This is different for the equidistant version where this is solved implicitly. Hope this helps. The changes should be merged/published within the coming weeks. Let us know if you have further questions or suggestions, otherwise, I'd like to close this issue. |
fixed by #132 and merged. closing issue |
Hi @RalphSteinhagen, Thanks very much for fixing this issue. Once you make a new release, I will test the fix and report back. Unfortunately, I haven't been able to configure my environment properly to compile and test out the unreleased version. |
You could also use the snapshot build, we have recently added some documentation for that to our README.md: https://github.com/GSI-CS-CO/chart-fx#using-the-snapshot-repository But it also won't be that long before the next release, so you can definitely also wait for that. |
So I finally had a chance to update to version 8.1.4 and test the histogram again. We use them everyday, but I just didn't have a chance to test the new version until now. The first bin draws!! So that seems to be fixed. However, the last bin still don't draw for me. See image below: Am I missing something here. Is there some other way I should test this? Is there some way I can help. Perhaps if you point me to the relevant section of code, I can see if these is any solution I can implement on my side. Again sorry I didn't test this earlier. Thanks very much for your efforts to fix this. You made such a wonderful charting library we rely completely on it a small library and gui we have written. Unfortunately, users have been complaining to me about the missing bins. Thanks!! |
I gave it a quick try and appears to work: Could you check this against the master and/or the JDK11 snapshot @wirew0rm mentioned above? Unfortunately, we haven't had the time to backport all recent changes to JDK8 yet but plan to do another x.1.5 release soonish. N.B. This will probably also the last x.1.y. release before we'll increase the minor number since we want to introduce some API changes w.r.t. handling of 3D datasets etc. If you have suggestions/feature requests... there is an open issue #44. |
It seems that the first and last bins of histograms are not drawn. Is this the intended behavior of the render?
The following chart was generated with version 8.1.1 using the ErrorDataSetRenderer with two DefaultNumericAxis using PolyLineStyle LineStyle.HISTOGRAM and ErrorType ErrorStyle.NONE. The only dataset was a Histogram constructed using the double[] bins option to set the start and end position of all bins. It is just random sampling of a gaussian distribution.
The text was updated successfully, but these errors were encountered: