import matplotlib.pyplot as plt
import numpy as np
np.random.seed(19860801)
# the example data
mu =100 # mean of distribution
sigma =15 # standard deviation of distribution
x = mu + sigma * np.random.randn(435)
num_bins =50
fig, ax = plt.subplots()
# the histogram of ax
n, bins, patches = ax.hist(x, num_bins, density=True)
# add a 'best fit line'
y =(1/(np.sqrt(2*np.pi)* sigma))*np.exp(-0.5*(1/sigma*(bins-mu))**2)
plt.plot(bins, y,'--')
ax.set_xlabel('xlabel')
ax.set_ylabel('ylabel')
ax.set_title('histogram')
plt.tight_layout()
plt.show()