4.2 3D Function Plots
Up to this point, mathematical or physical relationships were visualized in the plane using the plot(x,y) method. However, in reality, for example, electromagnetic waves propagate in three-dimensional space, and physical bodies can only exist with a spatial extension. Thus, an option would have to be provided to add a third dimension to the x-y plane. Matplotlib provides the option to create 3D plots using the plt.figure(). add_subplot(projection='3d') statement. Mathematical functions of the form 𝑓(x,y,z) are projected onto a 2D plane. Using the mouse pointer (keep the left mouse button pressed), the screen outputs can be rotated to any position you want. A helical line and a circular ring were selected as examples. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access