fig = plt.figure(facecolor='w')#生成图 ax = fig.add_subplot(111, projection='3d')#绘制子图 ax.scatter(t[0], t[1], density, c='r', s=50*density, marker='o', depthshade=True)#ax.scatter用于绘制点 ax.plot_surface(t[0], t[1], density, cmap=cm.Accent, rstride=1, cstr…