Matplotlib:尽管" alpha = 1&#34 ;?为什么plot_surface不是不透明的?

时间:2018-01-16 11:52:36

标签: python matplotlib

运行下面的代码(Python 3,matplotlib 2.0.2),我得到以下输出:

enter image description here

我希望并期望图表能够覆盖它下面的一些路径。出了什么问题?

import numpy as np
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
paths = np.cumsum(np.random.normal(size=(10,10)),axis=0)
ax=plt.figure().gca(projection='3d')
ax.plot(np.tile(range(10),(10,1)).T,paths)
N=30
Y = np.linspace(-5,5, N) 
X = np.linspace(0,10,N)
XX, YY = np.meshgrid(X,Y)
ZZ = YY**2
ax.plot_surface(XX, YY, ZZ, alpha=1)
plt.show()

0 个答案:

没有答案