import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 2 * np.pi, 100)
y1, y2 = np.sin(x), np.cos(x)
plt.plot(x, y1)
plt.plot(x, y2)
plt.title('line chart')
plt.xlabel('x')
plt.ylabel('y')
plt.show()
python 画函数曲线
最新推荐文章于 2024-10-09 13:05:24 发布