美文网首页
matplotlib中文字体显示

matplotlib中文字体显示

作者: 星星在线 | 来源:发表于2020-08-22 10:45 被阅读0次

查询matplotlib字体路径

import matplotlib

print(matplotlib.matplotlib_fname())

查看当前字体

from matplotlib.font_manager import fontManager
a=sorted([f.name for f in fontManager.ttflist])
 
for i in a:
    print(i)

设置永久全局有效中文字体

font.family = Heiti

相关文章

网友评论

      本文标题:matplotlib中文字体显示

      本文链接:https://www.haomeiwen.com/subject/roayuhtx.html