【python】画三维散点图Axes3D
程序员文章站
2022-07-13 10:39:17
...
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
points = np.load(path)
print(points.shape) # (N, 3)
fig = plt.figure()
ax = Axes3D(fig)
ax.scatter(points[...,0], points[...,1], points[...,2], cmap='spectral', c='r', label='airplane')
plt.show()
上一篇: ES6的开发环境搭建
下一篇: ES6的开发环境搭建