import
matplotlib.pyplot as plt
from
matplotlib
import
cm
x_axis, y_axis
=
np.linspace(
0
,
20
,
10
),
np.linspace(
0
,
20
,
10
)
X, Y
=
np.meshgrid(x_axis, y_axis)
Z1
=
(w1
-
x1
*
X
-
y1
*
Y)
/
z1
Z2
=
(w2
-
x2
*
X
-
y2
*
Y)
/
z2
Z3
=
(w3
+
X
-
Y)
/
z3
fig
=
plt.figure()
ax
=
fig.add_subplot(
111
, projection
=
'3d'
)
ax.plot_surface(X, Y, Z1, alpha
=
1
,
cmap
=
cm.Accent,
rstride
=
100
, cstride
=
100
)
ax.plot_surface(X, Y, Z2, alpha
=
1
,
cmap
=
cm.Paired,
rstride
=
100
, cstride
=
100
)
ax.plot_surface(X, Y, Z3, alpha
=
1
,
cmap
=
cm.Pastel1,
rstride
=
100
, cstride
=
100
)
ax.plot((sol[
0
],), (sol[
1
],), (sol[
2
],),
lw
=
2
, c
=
'k'
, marker
=
'o'
,
markersize
=
7
, markeredgecolor
=
'g'
,
markerfacecolor
=
'white'
)
ax.set_xlabel(
'X axis'
)
ax.set_ylabel(
'Y axis'
)
ax.set_zlabel(
'Z axis'
)
plt.show()