import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0,1,10)
y = (0.45-0.4*x)/0.6
z = 0.48*x/0.35
plt.figure(figsize = (8,4))
plt.plot(x,y,color="red")
plt.plot(x,z,"b--")
plt.legend()
plt.show()
matplotlib初试——求两条直线相交的大概位置
最新推荐文章于 2023-03-03 10:57:24 发布
本文演示了如何使用Python的numpy和matplotlib库进行基本的数学运算,并通过绘图展示运算结果。
1万+

被折叠的 条评论
为什么被折叠?



