plt.hist bin size code example
Example 1: plt normalized histogram
plt.hist(data, density=True)
Example 2: plt.hist using bins
counts, bins = np.histogram(data)
plt.hist(bins[:-1], bins, weights=counts)
Example 3: python matpotlib histplot
import matplotlib.pyplot as plt
plt.hist(x) #x is a array of numbers
plt.show()