How to plot distribution with given mean and SD on a histogram in Python
<p>I have a following Pandas dataframe named Scores,following is the subset of it</p>

<pre><code>      0
0  25.104179
1  60.908747
2  23.222238
3  51.553491
4  22.629690
5  53.338099
6  22.360882
7  26.515078
8  52.737316
9  40.235152
</code></pre>

<p>When I plot a histogram it looks like following</p>

<p><a href="http://i.stack.imgur.com/uv5ok.png" rel="nofollow"><img src="http://i.stack.imgur.com/uv5ok.png" alt="enter image description here"></a></p>

<p>Now, I want to plot a distribution on this histogram with mean=37.72 and SD=2.72
I am able to generate a distribution with following code </p>

<pre><code>x= np.linspace(10,90,1000)
y = norm.pdf(x, loc=37.72, scale=2.71)    # for example
pylab.plot(x,y)
pylab.show()  
</code></pre>

<p>How can I embed this on histogram ?</p>

<p>You can do something like this, </p>

<pre><code>plt.hist( The histogram data)
plt.plot( The distribution data )
plt.show() 
</code></pre>

<p>The <code>plt.show</code> will show both figures embedded in a single figure.</p>

python matplotlib histogram