How To Plot A Slicing Plane With A Surface With “matplotlib” In Python
I wonder how to create two slicing planes with a surface to two 2d figures. For example, I created a surface as below: from mpl_toolkits.mplot3d import Axes3D from matplotlib impor
Solution 1:
Actually, just need to plot them in two 2d figures
# slicing figure 1
fig2, ax2 = plt.subplots()
ax2.plot(x, f(x, y, b1, b2, b3, b4, b5, con))
ax2.set_title("x=y plane")
ax2.set_xlim(-3, 3)
ax2.set_ylim(1, 15)
# slicing figure 2
fig3, ax3 = plt.subplots()
ax3.plot(x, f(x, -y, b1, b2, b3, b4, b5, con))
ax3.set_title("x=-y plane")
ax3.set_xlim(-3, 3)
ax3.set_ylim(1, 15)
Post a Comment for "How To Plot A Slicing Plane With A Surface With “matplotlib” In Python"