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 width
kwarg
plt.bar(x, y, width=20)
You an also use an array for the
width
value to specify a different width for each bar
plt.bar(x, y, width=[3000, 20, 20])
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.