import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-1,1,100)
y1 = 2*x + 1
y2 = x**2
plt.figure()#创建第一个图
plt.plot(x,y1)
plt.figure()#创建第二个图
plt.plot(x,y2)
plt.show()
matplotlib绘图2 figure图像
最新推荐文章于 2024-06-02 09:41:31 发布