import matplotlib.pyplot as plt gridnumber = range(1,4) b1 = plt.bar(gridnumber, [0.2, 0.3, 0.1], width=0.4, label=\"Bar 1\", align=\"center\") b2
You should convert the x data as numpyarray. enter image description here