问题
What formula does Google Charts use to construct its histogram? For example, does it use Sturge's rule? Doane's rule? Scott's rule? etc. Is there any documentation on how it constructs it default bin size, min, and max?
Here is a link to the Histogram page for Google Charts.
Google Charts automatically chooses the number of bins for you. All bins are equal width and have a height proportional to the number of data points in the bin. In other respects, histograms are similar to column charts.
回答1:
check the histogram section in the notes for the October 1, 2018 release.
Generate buckets using tick generation algorithm. Default number of buckets is computed using a new
histogram.numBucketsRule
option. Possible values are'sqrt'
,'sturges'
, and'rice'
. See Histogram: Number of bins and width
来源:https://stackoverflow.com/questions/59832900/formula-for-google-charts-histogram