In Mma, the Histogram function only generates graphics. I am wondering how I can to get the data set; is there any convenient built-in function for this?
Many thanks.
HistogramList was added to Mathematica V8 to expose the binning and height calculations.
HistogramList[a]

For V7 you can hack the third argument to get the bins and counts.
Histogram[a, Automatic, (Print[{##}]; #2) &]

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With