加上以下的代码就会正常显示了
···
from matplotlib.font_manager import FontProperties
font = FontProperties(fname=r"C:\WINDOWS\Fonts\simsun.ttc", size=14)#C:\WINDOWS\Fonts
plt.title(u'入口流量',fontproperties=font)
···
image.png加上以下的代码就会正常显示了
···
from matplotlib.font_manager import FontProperties
font = FontProperties(fname=r"C:\WINDOWS\Fonts\simsun.ttc", size=14)#C:\WINDOWS\Fonts
plt.title(u'入口流量',fontproperties=font)
···
image.png本文标题:python 画图中文乱码(仅windows)
本文链接:https://www.haomeiwen.com/subject/qdsjixtx.html
网友评论