How do I scale the x and y axes in mayavi2?

泪湿孤枕 提交于 2019-11-30 16:57:14

问题


I want to do a 3-d plot with mayavi2 using mayavi.mlab.surf(). This function has an argument called warp_scale that can be used to scale the z axis, I'm looking for something similar but for the x and y axes.

I can do this manually by multiplying the x and y arrays and then using the ranges argument in mayavi.mlab.axes() to correct the axes labels, however I'm looking for a more direct approach like that of warp_scale.

Thanks!


回答1:


when "m" is your surface object:

m.actor.actor.scale = (0.1, 1.0, 1.0)

http://osdir.com/ml/python.enthought.devel/2006-11/msg00067.html




回答2:


I was looking for the same feature. And it turns out you simply can't do it,

http://comments.gmane.org/gmane.comp.graphics.mayavi.user/630



来源:https://stackoverflow.com/questions/13015097/how-do-i-scale-the-x-and-y-axes-in-mayavi2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!