查看 设置字体 中文字体
from matplotlib.font_manager import FontManagerimport subprocess
my_font_path = 'simhei.ttf' # SimHei
FontManager().addfont(my_font_path)
mpl_fonts = set(f.name for f in FontManager().ttflist)
print('all font list get from matplotlib.font_manager:')
for f in sorted(mpl_fonts):
print('\t' + f)
import matplotlib
matplotlib.rc("font", family='SimHei')
翻译
搜索
复制
标签:mpl,matplotlib,字体,print,import,font From: https://www.cnblogs.com/papering/p/17452405.html