matplotlib画图显示中文

matplotlib中画图legend默认都是英文,如果要修改为中文,需要额外添加中文字体

如:

ax.legend(legend,title='中文测试',loc=1,markerscale=0.3,bbox_to_anchor=(1.15,1.18),prop={'family':'SimHei','size':15})

猜你喜欢

转载自blog.csdn.net/nicholas_dlut/article/details/85230978