[英]How to change the spacing values in a python mayavi object?
I have plotted a few things using mlab in Python mayavi. 我已经在Python mayavi中使用mlab绘制了一些东西。 For some reason, when I create an isosurface by doing: 由于某些原因,当我通过执行以下操作创建等值面时:
s = mlab.contour3d(xx, yy, zz, data, contours=[1.5], figure=fig)
it creates one with a spacing (0, 0, 0.5) when it should be (0.5, 0.5, 0.5). 当它应为(0.5,0.5,0.5)时,它将创建一个间距为(0,0,0.5)的数字。 How do I set that spacing in my script without having to manually go into the figure's pipeline (show below)? 如何在脚本中设置该间距而不必手动进入图形的管线(如下所示)?
我能够通过以下方式自己弄清楚:
fig.children[-1].spacing = np.array([0.5, 0.5, 0.5])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.