Solution.append((k,tri))
def takeSecond(elem):
return elem[1]
Solution[idx].sort(key=takeSecond,reverse=True)
ax.scatter(xs=x, # x 轴坐标 np.array(P1[0],P2[0])
ys=y, # y 轴坐标 np.array(P1[1],P2[1])
zs=z, # z 轴坐标 np.array(P1[2],P2[2])
zdir='z', #
s=0.1
) # s=70, # size
ax.plot3D(x,y,z) # 画线
x_p = np.linspace(-10, 10, 100)
y_p = np.linspace(-10, 10, 100)
x_p, y_p = np.meshgrid(x_p, y_p)
z_p = X[0, 0] * x_p + X[1, 0] * y_p + X[2, 0] # 平面方程
ax.plot_wireframe(x_p, y_p, z_p, rstride=10, cstride=10)