On Mon, Mar 30, 2009 at 11:25 AM, Bala subramanian <bala.biophysics@gmail.com> wrote:

hist plots a distribution whose integral is 1.

Friends,

I tried to plot a histogram and pdf of my data (data file attached 1.dat). When i see the figure (attached file test.png) , i see y axis more than 1 (although it should not when i use normed=1. I am not getting why this happens.

Somebody kindly write me i) Why the y-axis scales more than 1 ii) after plotting histogram and pdf, how to delete the histogram and show only the normal curve.

The following are the commands i used.

data=load('1.dat')

x=[:,1]

mu=mean(x);st=std(x)

n,bins,patch=hist(x,50,normed=1,histtype='stepfilled')

y = normpdf( bins, mu, st)

plot(bins, y, 'k--', linewidth=1.5)

hist plots a distribution whose integral is 1.