matplotlib画图显示中文
程序员文章站
2024-01-19 15:13:10
...
下载字体
- 拷贝到anaconda3/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/ttf
- ~/.matplotlib/fontlist-v310.json文件,追加配置
- 清空缓存~/matplotlib/tex.cache 目录
- 画图的时候使用代码:
font = {'family': 'SimHei', 'size': '20'}
plt.rc('font', **font)
matplotlib画图显示中文
参考https://www.jianshu.com/p/240ea3ae0dc9
下一篇: hp打印机6L显示内存不足该怎么解决?