这个网址ID为夏星辰的方法二
https://www.zhihu.com/question/344490568/answer/3604121881
用的import matplotlib.pyplot as plt
plt.rcParams["font.family"]=["Times New Roman", "simSun"]
plt.rcParams["font.serif"]=["Times New Roman","SimSun"]
plt.rcParams["font.sans-serif"]=["Times New Roman","SimSun"]
plt.rcParams["mathtext.fontset"]="custom"
轻松解决