首页天道酬勤matplotlib安装教程,matplotlib使用教程

matplotlib安装教程,matplotlib使用教程

admin 05-05 15:28 170次浏览

python matplotlib多个折线图代码importmatplotlib.pyplotaspltx=[ 6,24,48,72 ] y1=[ 87,174,225,254 ] y2=[ 24,97 ] 67 ) PLT.title (扩散速度) (折线图标题PLT.rcparams ) font.sans-serif ) Simhei ) #汉字plt.xlabel ) (时间) ) x轴标题PLT . markersize=3) #绘制折线图,添加数据点,然后绘制点大小PLT.plot(x,y2,marker='o (,markersize=3) PLT.plot ) x,yyt marker='o ',markersize=3) for a,b in zip(x ) x,y1 ) 3360 PLT.(fontsize=10 ) #数据标签的位置和大小for a,b in zip(x,y1 ) 设定fontsize=)的b,b,ha='center ',va='bottom ',fontsize=10 ) for a,binzip(x,y4 ) :PLT.text(a,b y5 ) :PLT.text(a,b,b,ha='center ',va='bottom ',fontsize=10 ) plt.legend([ ) [ '方案1 ','方案2

linux隐藏文件命令,linux命令行怎么打开 python简单绘图,python 折线图