x = np.linspace(2010,2210,20)
Tline, = plt.plot(x,T, label="No Taxation", linewidth=2)
TtaxLine, = plt.plot(x,T_tax, label= "Ad Valorem", linestyle='--', linewidth=2)
TunitLine,= plt.plot(x,T_unit, label="Per Unit Tax", linewidth=2)
legend= plt.legend(handles=[Tline, TtaxLine, TunitLine], loc="upper left")
plt.title ('Effect of Taxation on Mean Temperature', fontsize=16)
plt.xlabel('Year')
plt.ylabel('Degrees Celsius')
plt.show ()
已生成图形,但图形中没有线条
您需要指定以下变量:
(顶部是否有进口):
相关问题 更多 >
编程相关推荐