Mercurial > hg > numerics
diff numerics/histogram.py @ 83:01b8009facc8
stub: generation
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 01 Mar 2015 12:56:32 -0800 |
parents | 738a2400f0f3 |
children | 8448c62a4917 |
line wrap: on
line diff
--- a/numerics/histogram.py Sun Mar 01 09:42:35 2015 -0800 +++ b/numerics/histogram.py Sun Mar 01 12:56:32 2015 -0800 @@ -114,5 +114,13 @@ if options.max is None: options.min = max([max(column) for column in columns]) + if not options.nbins: + # find number of bins, if not specified + # We'll use a guess of 2 items per bin, on average + options.nbins = len(columns[0]) / 2 + + # make some histograms + + if __name__ == '__main__': main()