Legend-用python中的matplotlib.legend()函数显示图例(中文显示)
这个过程其实很简单,代码如下:import matplotlib.pyplot as pltfrom matplotlib import font_managermy_font=font_manager.FontProperties(fname=r"c:\windows\fonts\simsun.ttc",size=30) plt.xlabel(u'X轴',fontproperties=my_font) plt.ylabel(u'Y轴',fontproperties=my_font)