Hi group,

I have the following ipython 'session':

In [23]: data = [0, 0.4, 0.6, 1, 2, 3]

In [24]: bins = [0, 1, 2, 3]

In [25]: hist(data, bins, align='edge')
Out[25]: (array([3, 1, 1, 1]), [0, 1, 2, 3], <a list of 4 Patch
objects>)

In [26]: hist(data, bins, align='center')
Out[26]: (array([3, 1, 1, 1]), [0, 1, 2, 3], <a list of 4 Patch
objects>)


I would suspect that the histogram output from 'center' should be [2, 2,
1, 1]. Why is this not so? At least, the two should be different? I
would say that with edge, my bins would be 0-1, 1-2, 2-3, 3-4, and that
center should give me -0.5-0.5, 0.5-1.5, 1.5-2.5, 2.5-3.5, but this
seems not to be the case??? Any help understanding this would be greatly
appreciated!

Thanks,

David


-------------------------------------------------------------------------
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