import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-1,1,50) # 生成-1~1的50個(gè)點(diǎn)
y = 2*x+1
plt.plot(x,y)
plt.show()
y=2*x+1.png
y = x**2
plt.plot(x,y)
plt.show()
y = x**2.png
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-1,1,50) # 生成-1~1的50個(gè)點(diǎn)
y = 2*x+1
plt.plot(x,y)
plt.show()
y = x**2
plt.plot(x,y)
plt.show()