missing last bin in histogram plot from matplot python
<p>I'm trying to draw histrogram based of my value </p>

<pre><code>x = ['3', '1', '4', '1', '5', '9', '2', '6', '5', '3', '5',
     '2', '3', '4', '5', '6', '4', '2', '0', '1', '9', '8', 
     '8', '8', '8', '8', '9', '3', '8', '0', '9', '5', '2',
     '5', '7', '2', '0', '1', '0', '6', '5']
x_num = [int(i) for i in x]

key = '0123456789'
for i in key:
    print(i," count =&gt;",x.count(i))

plt.hist(x_num, bins=[0,1,2,3,4,5,6,7,8,9])
</code></pre>

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

<p>The last 2 numbers "8, 9" bin should have distribution count of 6 , 4 
But in histogram it combine 8 and 9 and get value of 10 instead of separate them. Total number of bin should be 10 => but it only giving me graph of 9..</p>

<p>How could I separate them and break 8 and 9 ? </p>

<pre><code>import matplotlib.pyplot as plt


x = ['3', '1', '4', '1', '5', '9', '2', '6', '5', '3', '5',
     '2', '3', '4', '5', '6', '4', '2', '0', '1', '9', '8',
     '8', '8', '8', '8', '9', '3', '8', '0', '9', '5', '2',
     '5', '7', '2', '0', '1', '0', '6', '5']
x_num = [int(i) for i in x]

key = '0123456789'
for i in key:
    print(i, " count =&gt;", x.count(i))

plt.hist(x_num, bins=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10])
plt.show()
</code></pre>

python matplotlib