中文乱码可能有两种情况 1. matplotlib里面有中文字体 2. 没有中文字体
查看是否有中文字体:
# 查询当前系统所有字体
from matplotlib.font_manager import FontManager
import subprocess
mpl_fonts = set(f.name for f in FontManager().ttflist)
print('all font list get from matplotlib.font_manager:'
中文乱码可能有两种情况 1. matplotlib里面有中文字体 2. 没有中文字体
查看是否有中文字体:
# 查询当前系统所有字体
from matplotlib.font_manager import FontManager
import subprocess
mpl_fonts = set(f.name for f in FontManager().ttflist)
print('all font list get from matplotlib.font_manager:'