Problem Description
问题:Glyph 22885 missing from current font. font.set_text(s, 0.0, flags=flags):
When using matplotlib to draw a chart, the Chinese title cannot be displayed, prompting Glyph 22885 missing from current font. font.set_text(s, 0.0, flags=flags)
Cause Analysis:
Reason: Chinese font is not set
solution:
matplotlib is set up using the following code:
import matplotlib as mpl
mpl.rcParams['font.sans-serif'] = ['SimHei']
mpl.rcParams['font.serif'] = ['SimHei']
seabron is set up using the following code:
sns.set_style('whitegrid',{
'font.sans-serif':['SimHei','Arial']})