This is my own histogram code
def my_histo(l, ll,couleur='skyblue',bord='red',montext="$ABC$",rapport='automatic',ajust=-1225):
A=sum(plot(polygon([(l[j],0),(l[j],ll[j]),(l[j+1],ll[j]),(l[j+1],0)],color=couleur,
edgecolor=bord)) for j in range(len(l)-1))
T = text(montext,((min(l)+max(l))/2,ajust))
return show(A+T,aspect_ratio=rapport)
with the following data it works approximatively nicely
y=list([7301.06, 2887.38, 429.70, 1104.18, 773.924, 0.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1828.35, 1921.33, 0.000000, 0.000000, 0.000000, 0.000000,
0.000000, 0.000000,0.000000, 3395.03])
and
x = [75.6750, 251.025, 426.375, 601.725, 777.075, 952.425, 1127.78, 1303.12, 1478.48,
1653.83, 1829.18, 2004.53, 2179.88, 2355.23, 2530.58, 2705.93, 2881.28, 3056.62, 3231.98, 3407.33]
my_histo(x, y, couleur='skyblue',bord='red')
But I have made a mistake since the last value is not displayed as a rectangle and I do not see which. Then the y axis extend under 0 isd there a way to forbid that.