【python】使用matplotlib绘制线形图,plt.show(),超简单
python使用matplotlib绘制线形图:
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0,10,100)
y_1 = x*3 + 10
plt.plot(x,y_1)
plt.show()
效果图:
python使用matplotlib绘制线形图:
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0,10,100)
y_1 = x*3 + 10
plt.plot(x,y_1)
plt.show()
效果图: