I am very new to coding, and I am trying to create a bell curve Gaussian that creates bars with the bin width 10 and quantity 30. Here us the code I am currently using.
import numpy as np
from matplotlib import pyplot as plt
from scipy.stats import norm
domain = np.linspace(-2,2,1000)
bins = np.linspace(0, 10, 30)
plt.plot(domain, norm.pdf(domain,0,1), bins)
plt.show()
However when I plot them, I get two lines. I now see that it is because I am using np.linspace but how can I create the bins?