plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签
plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号
Not present
plt.rcParams[‘font.sans-serif’] = [‘SimHei’]
Result 1: No Chinese
Just available
plt.rcParams[‘font.sans-serif’] = [‘SimHei’]
Result 2: There is Chinese, no negative sign
加上
plt.rcParams[‘axes.unicode_minus’] = False
Result 3: There is Chinese and there is a negative sign