Matplotlib histogram is adding a small bar at the second histogram bin

Viewed 201

I think may hist function have some problems, at certain cases when I plot an histogram with matplotlib:

pylab.figure()
H, bins, _  = pylab.hist([2,2])
print H
print bins

The result is:

histogram

[ 0.  0.  0.  0.  0.  2.  0.  0.  0.  0.]
[ 1.5  1.6  1.7  1.8  1.9  2.   2.1  2.2  2.3  2.4  2.5]

Do you see at the plot that "bump" at between 1.5 and 1.6, where it is coming from? How can I avoid it?

2 Answers
Related