matplotlib设置中文显示
#!/usr/bin/python#coding: utf-8from matplotlib.font_manager import FontPropertiesimport matplotlib.pyplot as pltfont = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=14)plt.xlabel(u"
·
#!/usr/bin/python
#coding: utf-8
from matplotlib.font_manager import FontProperties
import matplotlib.pyplot as plt
font = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=14)
plt.xlabel(u"电压差(V)", fontproperties=font)
plt.ylabel(u"介质损耗角差(度)", fontproperties=font)
plt.title(u"介质损耗角和荷电状态SOC关系图", fontproperties=font)
plt.show()
更多推荐
已为社区贡献41条内容
所有评论(0)