2019-03-07 上海
- 参考这里解决matplotlib图例中文乱码问题。主要要点:
# 查看你的matplotlib所在位置
import matplotlib
print(matplotlib.matplotlib_fname())
# 下载字体示意
#! wget https://www.fontpalace.com/font-download/SimHei/
# 修改.../matplotlib/mpl-data/matplotlibrc中的font.family、font.sans-serif的配置
# 重新加载字体 重点
from matplotlib.font_manager import _rebuild
_rebuild() #reload一下