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

2

9

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!

Inapprehensive answered 22/10, 2012 at 15:53 Comment(0)
L
7

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

Lamebrain answered 8/4, 2014 at 6:49 Comment(0)
T
4

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

Thud answered 16/2, 2013 at 20:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.