HistogramBin and HistogramDataset : where is the connection?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
JFreeChartUser
Posts: 9
Joined: Mon Sep 11, 2006 12:41 pm

HistogramBin and HistogramDataset : where is the connection?

Post by JFreeChartUser » Fri Sep 22, 2006 8:30 am

Hello,
is it possible to create bins for a HistogramDataset like in SimpleHistogramDataset and SimpleHistogramBin?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Sep 22, 2006 10:10 am

The HistogramDataset class creates the bins internally...you can specify the number of bins, but the bin ranges are calculated automatically to span the data.

The SimpleHistogramDataset is a separate implementation that allows you to explicitly define the bins, which some people prefer.

So you need to choose one implementation or the other, depending on your own preferences.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked