I plot a histogram using the following:
import matplotlib.pyplot as plt l = [0,0,1,1,1,2,3,3,4,4,4,4] histogram = plt.hist(l, bins=5) plt.show()