I have done some searching, but I still can’t make things work.
The environment is kaggle, which is perfect for reproduction.
%matplotlib inline
import matplotlib.pyplot as plt
plt.title('测试')
plt.show()
This will dispaly empty squares.
The doc talks about this: Text properties and layout — Matplotlib 3.10.1 documentation
So I installed the chinese font by apt, got the family name, set it in rcParams. But it doesn’t work.
! apt-get install -y fonts-noto-cjk fonts-wqy-microhei
! fc-list :lang=zh family
from matplotlib import rcParams
rcParams['font.family']=['Noto Sans CJK SC', 'WenQuanYi Micro Hei']

