-
Notifications
You must be signed in to change notification settings - Fork 101
Description
When using a Histogram the values inserted into the dataset is changed. Picture As can be seen in the picture the data point is 54.5, but all my data is ints converted to double, i.e. 54 -> 54.0, 55 -> 55.0 etc.
I should never be able to get 54.5, and I've checked the conversion from int to double (even though it should be without precision loss).
My data is not guaranteed to be equidistant so the Histogram is created with the Histogram(String name, double[] xBins) constructor, and filled with the fill(final double x) method. I'm using an ErrorDataSetRenderer().
I've tried using the other constructors as well but in those equidistant is set to true so they are not ideal, and the result is way different i.e. points are close to original value e.g. 54 -> 53.95843957493, and as my data is not equidistant 0 values are used as fillers where I dont provide data to make it equidistant. See picture
The Histogram dataSet is nice to use as I dont have to count occurences in my data but simply insert it into the dataSet.
Environment:
- OS: Ubuntu 20.04
- Java version 8:
- ChartFx version: JDK8