Categories
matplotlib pandas python

Pandas : histogram with fixed width

I have data which I want to do an histogram, but I want the histogram to start from a given value and the width of a bar to be fixed. For example, for the serie [1, 3, 5, 10, 12, 20, 21, 25], I want, instead of

>>> p.Series([1, 3, 5, 10, 12, 20, 21, 25]).hist(bins=3).figure
# | |
# | | |
# | | |
# 0 8.5 17

Current histogram

I want the bars to have a width of 10 :

|       |
| | |
| | |
0 10 20

How can I do that ?

EDIT : I eventually get what I wanted good hist