I am generating histograms with matplotlib.
I need the bins to be of unequal width as I'm mostly interested in the lowest bins. Right now I'm doing this:
plt.hist(hits_array, bins = (range(0,50,10) + range(50,550,50)))
This creates what I want (the first 5 bins have a width of 10, the rest of 50), but the first five bins are, of course, narrower than the latter ones, as all bins are displayed on the same axis.
Is there a way to influence the x-axis or histogram itself so I can break the scale after the first 5 bins, so all bins are displayed as equally wide?
(I realize that this will create a distorted view, and I'm fine with that, though I wouldn't mind a bit of space between the two differently scaled parts of the axis.)
Any help will be greatly appreciated. Thanks!