引用自:https://zhuanlan.zhihu.com/p/104081310
查看支持的字体:
# 查询当前系统所有字体
from matplotlib.font_manager import FontManager
mpl_fonts = set(f.name for f in FontManager().ttflist)
print('all font list get from matplotlib.font_manager:')
for t in sorted(mpl_fonts):
print(t)
设置字体
plt.rc("font",family='YouYuan')
linux下需要拷贝中文字体到
~/miniconda3/envs/main/lib/python3.8/site-packages/matplotlib/mpl-data/matplotlibrc
https://blog.csdn.net/ninjaxuxu/article/details/88685023
标签:中文,FontManager,mpl,显示,matplotlib,manager,字体,font From: https://www.cnblogs.com/wangbingbing/p/17901268.html