Most examples of object-oriented matplotlib get an Axis object with something like
import matplotlib.pyplot as plt fig1 = plt.figure() ax1 = fig1.add_subplo
To creat 3D instance, there are three ways:
plt.gca(projection='3d') plt.subplot(projection='3d') fig = plt.figure() fig.add_subplot(111, projection='3d')
Maybe the third way is more complex.