一列数据:
importpandasaspdimportmatplotlibmatplotlib.rcparams [ ' axes.unicode _ MINUS ' ]=falsefrommmatplotlibimportpyplotaspltextextexte 单根/PCL sum.xlsx ' df=PD.data frame (PD.read _ excel (excel file ) ) x=list 4) ax=fig.add _ su bplot (1,1,1,1 ) 设置' ko-,其中横轴是d:list或c:seriesPLT.grid(true ) plt.show )的结果。
4am _ zgg 014 am _ forever4am _ we less4am _ xlx uu星期一046890265星期二1593071882星期三260268134星期四168097103星期五45624365160 importpandasasaspdidion mpl.rcparams [ ' font.sans-serif ' ]=[ ' simhei ' ] matplotlib.rcparams [ ' axes.unicode _ MINUS ' ]=falsefromed 管理员/桌面/2019.10.05 /折线图/多支/训练比赛. xlsx' (fig=plt.figure ) ) SNS.set ) palette='muted ', 1 )可用#PPS excel替换(ticks=ax.set _ x ticks range (0,5 ) ) x轴上有六个标签x=[ '星期一','星期二','星期三','星期四', '星期五' ]设置labels=ax fontsize=' small ' ) frompylabimport * mpl.rcparams [ ' font.sans-serif ' ]=[ ' simhei ' ] ax ax.plot(df ) (4am_forever )、' b )、label='4AM_forever ) (ax.plot(df ) ) 4am label=' 4am _ xlx uu ' loc是位置参数,best也可以使用PLT.legendPLT.grid(true ) plt.show