1counts, bins = np.histogram(data)
2plt.hist(bins[:-1], bins, weights=counts)
1import matplotlib.pyplot as plt
2plt.hist(x) #x is a array of numbers
3plt.show()
1matplotlib.pyplot.hist(x, bins=None, range=None, density=False, weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log=False, color=None, label=None, stacked=False, *, data=None, **kwargs)