I'm plotting some histograms with hist()  --- well, actually with  
ax.hist(), where ax is an axis --- and the "normed=1" isn't working  
the way I would expect.

from pylab import *

data = sin(arange(0.0,100,.01))

fig = figure()
ax  = fig.add_subplot(111)
ax.hist(data,bins=50,normed=1,align='center')
show()

If I do not include normed=1, then the Y scale is an actual count  
inside each bin. (The scale goes from 1-1000).

If I include normed=1, the Y scale goes from  1 - 7.  What does that  
mean?  normed is supposed to make the first result from ax.hist be a  
normalized probability distribution. But I would think that it would  
change the Y axis to be a probability as well, and it doesn't do that.

The docstrings do not give any insight, so I looked at the source  
code. It certainly *looks* like it's plotting the probability  
distribution. But why does the above example give a Y scale going  
from 1 to 7? Perhaps I'm showing my lack of statistics here, but I  
would think that a strict probability distribution would have the  
value of all of the bars adding to 1,

Sorry to send out so many messages today. I really am trying to  
figure this out on my own...





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to