我试图为数据绘制条形图,但是我不知道为什么在运行单元格时为什么不断收到“ matplotlib折旧警告”。这是代码,自从我刚开始学习python以来,我将非常感谢您的帮助。
#make an empty plot
fig1 = plt.figure(figsize=(30,20))
#plotting
ax0 = fig1.add_subplot(1,1,1)
ax0.bar(plot_set, height = 10)
#set labels
x_label = ["January", "Febury", "March", "April", "May", "June"]
x_title = ["Month"]
y_title = ["Number of flights"]
ax0.set_ylabel(y_title)
ax0.set_title('Impact of COVID-19 on airlines')
x = np.arange(len(x_label))
ax0.set_xticks(x)
ax0.set_xticklabels(x_label)
ax0.set_xlabel('x_title')
plt.show()