Approaches to choosing number of bins in histogram Choosing the number of bins in a histogram has always been something that gets me thinking a lot. Based on the number of bins chosen, the graph at time looks a lot different and also could lead to different interpretations.  

Below is the square-root rule, which I use as the thumb-rule for selecting the number of bins in most occasions.  

Posting this question here to hear other opinions. 

data_pts = len(np.array(data))
bin_cnt = int(np.sqrt(data_pts))

plt.hist(data, bins=bin_cnt)
Another method is Bayesian Blocks from Studies in Astronomical Time Series Analysis. VI. Bayesian Block Representations by Scargle et al.

Bayesian Blocks is a dynamic histogramming method which optimizes one
of several possible fitness functions to determine an optimal binning
for data, where the bins are not necessarily uniform width.

Bayesian Blocks for Histograms