输出的图片无法显示标签
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.pyplot import savefig as save
plt.rcParams['font.sans-serif'] = 'SimSun'
# 绘制上下极限散点图
y1 = [1+1/n for n in range(1, 100, 2)]
y2 = [1.1+1/n for n in range(2, 102, 2)]
x = [i for i in range(1, len(y1)+1)]
plt.scatter(x, y1, s=5, c="r", label=r"$x_{2k-1}=1+\frac{1}{n},K\in N^{+}$")
plt.scatter(x, y2, s=5, c="r", label=r"$x_{2k}=1.1+\frac{1}{n},K\in N^{+}$")
plt.axhline(1, c="b")
plt.axhline(1.1, c="b")
plt.title('上下极限', fontsize=24)
plt.xlabel('n', fontsize=24)
plt.ylabel(r"$x_{n}$", fontsize=24)
save(r"C:\Users\PC\Pictures\Saved Pictures\上下极限散点图.png", dpi=800, bbox_inches = 'tight')
plt.legend(loc="upper center")
plt.show()
这个是pycharm运行完后的界面
我尝试了各种图片格式进行输出,发现还是无法显示标签
甚至是pdf都不能显示标签