framework
framework copied to clipboard
Add an Example for Histogram Class
Please add an example for Histogram Class.
I am trying to create a histogram using a list of doubles, but no matter what I do there seems to be no data in the histogram. Some examples would be useful.
Histogram aHist = new Histogram();
aHist.AutoAdjustmentRule = BinAdjustmentRule.SquareRoot;
double[] aItems = { 0.002, 0.0024, 0.01, 0.012, 0.8, 0.03, 0.05 };
aHist.FromData(aItems);
long cnt = aHist.TotalCount; //is 0
Help Topic: Basic Histogram from data set
Hey there, there is an issue with your code, you should assign aHist.FromData(aItems) to an histogram, FromData returns an histogram:
aHist = aHist.FromData(aItems);