beast-dev / tracer

Posterior summarisation in Bayesian phylogenetics
https://beast.community/tracer
GNU Lesser General Public License v2.1
55 stars 17 forks source link

FrequencyPlot is wrong if x not starting from 0 for ordinal type #58

Closed walterxie closed 7 years ago

walterxie commented 7 years ago

It seems the start of bins messed up all bars, and some bars were added together.

Wrong plot:

screen shot 2017-03-30 at 3 33 48 pm

Correct plot:

screen shot 2017-03-30 at 3 33 58 pm

walterxie commented 7 years ago
} else if (binSize > 1) {
            // getMinorTickSpacing() returns 1.25, if the min integer slightly bigger than 0
            binSize = 0.5;
            binCount = (int) ((axis.getMaxAxis() - axis.getMinAxis()) / binSize) + 2;
        }