Я не могу пометить ваш вопрос как дубликат, но я думаю мой ответ на этот вопрос может быть то, что вы ищете?
Я не уверен, как выЯ буду иметь смысл результата, но вы можете использовать numpy.histogram
, чтобы вычислить высоту ваших баров, а затем нанести их непосредственно на произвольную шкалу х.
x = np.random.normal(loc=50, scale=200, size=(2000,))
bins = [0,1,10,20,30,40,50,75,100]
fig = plt.figure()
ax = fig.add_subplot(211)
ax.hist(x, bins=bins, edgecolor='k')
ax = fig.add_subplot(212)
h,e = np.histogram(x, bins=bins)
ax.bar(range(len(bins)-1),h, width=1, edgecolor='k')

РЕДАКТИРОВАТЬ Здесь приведена настройка для меток x-tick, чтобы легче было видеть соответствие.
my_bins = [10, 20, 30, 40, 50, 120]
my_data = [5, 5, 6, 8, 9, 15, 25, 27, 33, 45, 46, 48, 49, 111, 113]
fig = plt.figure()
ax = fig.add_subplot(211)
ax.hist(my_data, bins=my_bins, edgecolor='k')
ax = fig.add_subplot(212)
h,e = np.histogram(my_data, bins=my_bins)
ax.bar(range(len(my_bins)-1),h, width=1, edgecolor='k')
ax.set_xticks(range(len(my_bins)-1))
ax.set_xticklabels(my_bins[:-1])
