Mayavi从边缘拉伸的表面图

时间:2019-03-02 04:06:31

标签: python-3.x mayavi

我正在使用Mayavi冲浪图来绘制简单的地平线或曲面,但是我的曲面已经变得张紧了。

数据以numpy格式(x,y,Z)显示x和Y以及时间的高程。

我正在应用一些简单的滤镜来平滑表面,我无法理解如何停止沿Z轴的拉伸。

代码:

hor = df.values

#print(hor.shape)


x = hor[:,0]
y= hor[:,1]
z= hor[:,2]

test =  pd.DataFrame(z)
print(test)

test.hist()

plt.show()


#print(z)
hor = geoprobe.horizon(x,y,z)


z = hor.grid
[![enter image description here][1]][1]

#Clip out some spikes and smooth the surface a bit...
z = scipy.ndimage.median_filter(z, 2)
z = scipy.ndimage.gaussian_filter(z, 1)

# Quirks due to the way hor.grid is defined...
mlab.surf(np.arange(z.shape[0]), np.arange(z.shape[1]), -z.T)

mlab.show()

任何想法。

0 个答案:

没有答案
相关问题