Python 2.7 三维matplotlib散点图中的照明

Python 2.7 三维matplotlib散点图中的照明,python-2.7,matplotlib,jupyter-notebook,lighting,scatter3d,Python 2.7,Matplotlib,Jupyter Notebook,Lighting,Scatter3d,我有一个点云,看起来像…一个云。它在某些地方有凸起的特征,在其他地方有“折痕” 为了说明我的问题,我在下面附上了一个示例图像(用于创建第一个点云的脚本位于末尾) 但是,蓝色矩形中存在无法看到的拓扑,因为所有的点都是红色的,并且没有人工照明。同一数据集的不同视图(第2张和第3张图像)更好地显示拓扑。为了进一步说明这一点,还加入了第二种颜色 有没有办法向散点图添加某种照明,使折痕/凸起更明显 from mpl_toolkits.mplot3d import Axes3D import matpl

我有一个点云,看起来像…一个云。它在某些地方有凸起的特征,在其他地方有“折痕”

为了说明我的问题,我在下面附上了一个示例图像(用于创建第一个点云的脚本位于末尾)

但是,蓝色矩形中存在无法看到的拓扑,因为所有的点都是红色的,并且没有人工照明。同一数据集的不同视图(第2张和第3张图像)更好地显示拓扑。为了进一步说明这一点,还加入了第二种颜色

有没有办法向散点图添加某种照明,使折痕/凸起更明显

from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
vimport numpy as np

def randrange(n, vmin, vmax):
    return (vmax - vmin)*np.random.rand(n) + vmin

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

n = 3000

# For each set of style and range settings, plot n random points in the box
# defined by x in [23, 32], y in [0, 100], z in [zlow, zhigh].
for c, m, zlow, zhigh in [('r', 'o', -50, -25)]:
    xs = randrange(n, -5000, 5000)
    ys = randrange(n, -5000, 5000)
    #zs = xs**2+ys**2
    zs = (0.1*xs)**2-(0.1*ys**2)-5000
    zs2 = (0.3*xs)**2-(ys**2)-5000
    #zs = randrange(n, zlow, zhigh)
    ax.scatter(xs, ys, zs, c=c, marker=m)
    ax.scatter(xs, ys, zs2, c=c, marker=m)
    ax.view_init(elev=28., azim=-56)
ax.set_xlabel('X Label')
ax.set_ylabel('Y Label')
ax.set_zlabel('Z Label')

plt.show()