Page 1 of 1

Histogram even number bin size

Posted: Wed Jan 29, 2014 9:08 pm
by 9236183
Hello,

I have a histogram where I want to always have even numbered bin sizes regardless of the data added to the graph.

For example 4 bins with a range of 0 - 10, 10-20, 20-30, and 30-40.

Is it possible to set these bin boundaries with the Histogram function or would it be easier for me to roll my own ?

Re: Histogram even number bin size

Posted: Thu Jan 30, 2014 2:22 pm
by yeray
Hello,

Do you mean a THistogramSeries or a THistogramFunction?

Re: Histogram even number bin size

Posted: Thu Jan 30, 2014 8:46 pm
by 9236183
Hi Yeray,

Yes I'm currently using the THistogramFunction for this particular graph.

Basically the graphing works correctly if the data distribution has something in all the bins. If say there is no data in the 30-40 range and your bin range is 4 you get say 29 as your max you get 29 / 4 as your bin ranges rather than an even range.

I haven't tried but just typing the question made me think about it, I probably should just change the x-axis scale from auto and set it manually. Maybe its a case of me needing more sleep...

Re: Histogram even number bin size

Posted: Thu Jan 30, 2014 9:06 pm
by 9236183
In thinking some more, this will solve the x-axis numbering but won't effect the legend etc which uses the bin size and maximum number to calculate the percentages.

So I guess what I'm saying for the 30-40 band I'd want the legend to say 0%.

Maybe a fixed size x-axis will do this, I'll have to try.

Re: Histogram even number bin size

Posted: Tue Feb 04, 2014 9:29 am
by yeray
Hello,

Excuse us for the delayed reply here.
I'm not sure to understand what's the exact situation. If you still find problems with it, it would be helpful if you could arrange a simple example project we can run as-is to reproduce the situation here.