[MayaVi-users] axis scaling in surface plot
Status: Beta
Brought to you by:
prabhu_r
|
From: gerard m. <ger...@gm...> - 2009-03-25 14:48:25
|
Hi, I am trying to plot a surface using the enthought.mayavi.mlab module. My problem is that my data along the x-axis and y-axis are not of the same order, and so the resulting surface is completely shrinked... I do have to renormalize the data to obtain a surface that's really looks like one... for instance, if I do: from scipy import * from enthought.mayavi import mlab x, y = mgrid[-100:100:1, -1:1:0.01] z = random.rand(*x.shape) s = mlab.surf(x, y, z) #the surface displayed is completely shrinked on the y axis and z axis ( =1/100 of the x values) mlab.show() How can I control the scaling without renormalizing the inputs x, y, z ? Similarly, how can I limit the values displayed on the z-axis ? for example it could be, I have a couple of points with irrealisticly big values, and do not want them to appear in the graph... with the code above, If I do: z[2, 13] = 100000 mlab.surf(x,y,z) will display this 100000 point and corrupt the surface display... say I just want to ignore it and keep values between [0, 1] ? I have tried to play around with the mlab.axes() but it does help. Is there any mean ? I do not want to filter my input data as it is too big. Thanks a lot. Regards, Gérard |