2020
10-10
10-10
python绘制趋势图的示例
importmatplotlib.pyplotasplt#plt用于显示图片importmatplotlib.imageasmping#mping用于读取图片importdatetimeasdtimportmatplotlib.datesasmdatesfrompylabimport*defdraw_trend_chart(dates,y):mpl.rcParams['font.sans-serif']=['SimHei']#指定默认字体mpl.rcParams['axes.unicode_minus']=False#解决保存图像是负号'-'显示为方块的问题x=[dt.datetime.strptime(d,'%Y/%m/%d').date()for...
继续阅读 >