Can't get bar chart to plot in matplotlib
Using this code,
x = [420.0, 4353.0, 4373.0]; y = [269.0, 252.0, 283.0] plt.bar(x,y) plt.show()
Where are the bars? How do I get them to show up?
By default, each bar is plotted with a width of
0.8 and due to the large range of x values on your plot, that is too narrow to be visible when rendered. You'll instead want to specify a larger width using the
plt.bar(x, y, width=20)
plt.bar(x, y, width=[3000, 20, 20])