python 3D散点图

import matplotlib.pyplot as plt

x_list = [[3, 3, 2], [4, 3, 1], [1, 2, 3], [1, 1, 2], [2, 1, 2]]

fig = plt.figure ()

ax = fig.gca (projection='3d')

for x in x_list:

ax.scatter (x[0], x[1], x[2], c='r')

plt.show ()

python 3D散点图_第1张图片

你可能感兴趣的:(python,python,3d,matplotlib)