def func_sin():
# 准备 X 轴的数据, 0~10分成90段
x = np.linspace(0, 10, 90)
# 准备 y 轴的数据
y = []
for i in x:
print(i)
y.append(math.sin(i))
# 绘制线图
plt.plot(x, y,c='r' )
# 添加标题
plt.title("y = sin(x)")
# 添加 x 轴的信息
plt.xlabel("x")
# 添加 y 轴的信息
plt.ylabel("y")
# 显示线图
plt.show()