【mpl_toolkits.mplot3d】Axes3D绘制3d散点图

from mpl_toolkits.mplot3d

import Axes3D

cm = plt.cm.get_cmap('RdYlBu')

z = test_y

fig = plt.figure()

ax = Axes3D(fig)

ax.scatter(feat[:,0],feat[:,1],feat[:,2],c = z,edgecolors='k',cmap=cm,s=10)

你可能感兴趣的:(python函数)