叠加折线图
import pandas as pd import matplotlib.pyplot as plt weeks=pd.read_excel('c:/Temp/Orders.xlsx',index_col='Week') print (weeks) print(weeks.columns) weeks.plot.area(y=['Accessories','Bikes','Clothing','Components']) #area 为叠加 plt.title('Sales Weekly Trend',fontsize=16,fontweight='bold') plt.ylabel('Total',fontsize=12,fontweight='bold') #y轴名称Total plt.xticks(weeks.index,fontsize=8) # 以weeks索引走x轴 plt.show()