📅  最后修改于: 2022-03-11 14:46:35.854000             🧑  作者: Mango
import matplotlib.pyplot as plt
data = [5., 25., 50., 20.]
plt.bar(range(len(data)),data)
plt.show()
// to set the thickness of a bar, we can set 'width'
// plt.bar(range(len(data)), data, width = 1.)