mpl_toolkits.mplot3d#
The mplot3d toolkit adds simple 3D plotting capabilities (scatter, surface,line, mesh, etc.) to Matplotlib by supplying an Axes object that can createa 2D projection of a 3D scene. The resulting graph will have the same lookand feel as regular 2D plots. Not the fastest or most feature complete 3Dlibrary out there, but it ships with Matplotlib and thus may be a lighterweight solution for some use cases.
See themplot3d tutorial formore information.

The interactive backends also provide the ability to rotate and zoom the 3Dscene. One can rotate the 3D scene by simply clicking-and-dragging the scene.Panning is done by clicking the middle mouse button, and zooming is done byright-clicking the scene and dragging the mouse up and down. Unlike 2D plots,the toolbar pan and zoom buttons are not used.
Note
pyplot cannot be used to add content to 3D plots, because its functionsignatures are strictly 2D and cannot handle the additional informationneeded for 3D. Instead, use the explicit API by calling the respectivemethods on theAxes3D object.
axes3d#
Note
3D plotting in Matplotlib is still not as mature as the 2D case.Please report any functions that do not behave as expected as a bug.In addition, help and patches would be greatly appreciated!
axes3d.Axes3D (fig[, rect, elev, azim, roll, ...]) 3D Axes object.
axis3d#
Note
Seempl_toolkits.mplot3d.axis3d._axinfo for a dictionary containingconstants that may be modified for controlling the look and feelof mplot3d axes (e.g., label spacing, font colors and panel colors).Historically, axis3d has suffered from having hard-coded constantsthat precluded user adjustments, and this dictionary was implementedin version 1.1 as a stop-gap measure.
| An Axis class for the 3D plots. |
art3d#
| 3D line object. |
| A collection of 3D lines. |
| 3D patch object. |
| A collection of 3D patches. |
| A collection of 3D paths. |
| 3D PathPatch object. |
| A collection of 3D polygons. |
| Text object with 3D position and direction. |
| Return a direction vector. |
| Reorder coordinates so that 2Dxs,ys can be plotted in the plane orthogonal tozdir. |
| |
| Convert a |
| |
| Convert a |
| Convert a |
| Convert a |
| Reorder coordinates so that the axes are rotated withzdir along the original z axis. |
|
proj3d#
| Transform the points by the inverse of the projection matrix,invM. |
| Transform the points by the projection matrixM. |
| [Deprecated] |
| Produce a matrix that scales homogeneous coords in the specified ranges to [0, 1], or [0, pb_aspect[i]] if the plotbox aspect ratio is specified. |