framework icon indicating copy to clipboard operation
framework copied to clipboard

Add an Example for Histogram Class

Open runfastman opened this issue 5 years ago • 1 comments

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

runfastman avatar Mar 31 '20 14:03 runfastman

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);

DMLON avatar Aug 25 '20 15:08 DMLON