Histogram

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
nivedeeta

Histogram

Post by nivedeeta » Fri Sep 06, 2002 9:58 am

Hi,

I am plotting an Histogram using VerticalBarChart by setting setCategoryGapsPercent(0);

As Histogram is affected by the bin width, selecting the bin width is very important while plotting an Histogram

Is there any method to calculate default optimal bin width for an Histogram depending upon the dataset used for plotting it ?


Thanks,
Nivedeeta

David Gilbert

Re: Histogram

Post by David Gilbert » Fri Sep 06, 2002 10:18 am

Hi Nivedeeta,

There's no special support for histograms yet. I would probably use the VerticalXYBarChart for histograms, and write some utility classes for generating datasets that parameterise the intervals.

When you say 'optimal bin width', how do you determine this?

Regards,

DG.

nivedeeta

Re: Histogram

Post by nivedeeta » Fri Sep 06, 2002 11:03 am

Hi

I my application i have to determine the intervals(bin width) dynamically depending upon the dataset.

I cannot keep the bin width fix. It has to be decided depending on the dataset.

So i wanted to know is there any formula for calculating this interval?


Thanks,
Nivedeeta

Locked