如何更改python mayavi对象中的间距值?

如何更改python mayavi对象中的间距值?,python,3d,contour,mayavi,mayavi.mlab,Python,3d,Contour,Mayavi,Mayavi.mlab,我在Python mayavi中使用mlab绘制了一些东西。出于某种原因,当我通过以下操作创建等值面时: s = mlab.contour3d(xx, yy, zz, data, contours=[1.5], figure=fig) fig.children[-1].spacing = np.array([0.5, 0.5, 0.5]) 它创建一个应为(0.5,0.5,0.5)的间距为(0,0,0.5)的对象。如何在脚本中设置间距,而不必手动进入图形的管道(如下所示) 我通过以下方法自己解

我在Python mayavi中使用mlab绘制了一些东西。出于某种原因,当我通过以下操作创建等值面时:

s = mlab.contour3d(xx, yy, zz, data, contours=[1.5], figure=fig)
fig.children[-1].spacing = np.array([0.5, 0.5, 0.5])
它创建一个应为(0.5,0.5,0.5)的间距为(0,0,0.5)的对象。如何在脚本中设置间距,而不必手动进入图形的管道(如下所示)


我通过以下方法自己解决了这个问题:

s = mlab.contour3d(xx, yy, zz, data, contours=[1.5], figure=fig)
fig.children[-1].spacing = np.array([0.5, 0.5, 0.5])