折线图

weeks.plot(y=['Accessories', 'Bikes', 'Clothing', 'Components'])
plt.title('Sales Weekly Trend',fontsize=16,fontweight='bold')
plt.ylabel('Total',fontsize=12,fontweight='bold')
plt.xticks(weeks.index,fontsize=8)
plt.savefig('plot.jpg')

pandas versus Excel 学习笔记9(折线图、叠加区域图)

 

叠加区域图

weeks.plot.area(y=['Accessories', 'Bikes', 'Clothing', 'Components'])

pandas versus Excel 学习笔记9(折线图、叠加区域图)

 叠加区域图与叠加柱状图的区别在于,叠加区域图能够看出总体的变化趋势。

 

相关文章: