

add_subplot() : this function use to create axes.We want to define our figure and define the axes, and so far that's not new and same thing with subplot those same rules apply this is 1 1 1, now what will be new is you're going to have this new parameter called projection, and projection is our way of telling matplotlib that we want to have this be a three - dimensional projection, so ax it's creating the axes in this subplot it's doing so with a three dimensional object in mind.

Basic 3D Line from mpl_toolkits.mplot3d import axes3dĪx = fig.add_subplot(111, projection='3d') With this three-dimensional axes enabled, we can now plot a variety of three-dimensional plot types. And you’ll see if it looks like what you had in your mind! If you execute this line, you’ll see a window popping up. The line plt.show() says indeed that you want to see the plot. Once this submodule is imported, a three-dimensional axes can be created by passing the keyword projection='3d' to any of the normal axes creation routines Three-dimensional plots are enabled by importing the mplot3d toolkit, included with the main Matplotlib installation.
#AX SCATTER CODE#
These abbreviations are semi-standardized, and most tutorials, other scientific python code that you'll find elsewhere will use them as well from mpl_toolkits.mplot3d import Axes3d In this tutorial, we'll use the following import statements. Matplotlib can be used in Python scripts, the Python and IPython shells, the Jupyter notebook, web application servers, and four graphical user interface toolkits. Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms.

In this tutorial we'll use Matplotlib packages already installed
