Approaches to choosing number of bins in histogram
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