Python创建三维坐标轴对象Axes3D主要有三种方式: (1)第一种是利用matplotlib的关键字projection='3d’l来实现; (2)第一种是利用mpl_toolkits.mplot3d包的Axes3D函数来实现。 (3)第三种是利用mayavi.mlab包的来实现。 1、matplotlib from matplotlib import pyplot as plt #定义坐标轴 fig = plt.figure() ax1 = plt.axes(projection='3d') #ax