Re: Modify surf output (axes, scaling)
Subject: Re: Modify surf output (axes, scaling)
Newsgroups: gmane.comp.python.enthought.devel
Date: 2008-07-17 10:27:36 GMT
Hi Gaël, thanks for the quick reply.
The extent() trick did do something, but not what I wanted :/ the surface was black instead of colored according to the lut parameter, and the axes still had the original size, see http://i37.tinypic.com/axi1p0.png (this time the colors were ok again, weird).
So I went and asked Pierre at http://groups.google.com/group/pythonxy/browse_thread/thread/df73bd57fbe9d698?hl=en about the update, and he told me that I should ask here for the new binaries, as they are not yet available on http://code.enthought.com/enstaller/eggs/windows/xp/ . So, can you maybe put them online? :)
And that EPD package looks really nice, thanks for the link. This should be featured more prominently on the main page ( https://svn.enthought.com/enthought/wiki/MayaVi#Installation )... when I tried to instally mayavi2, it took several hours and lots of dead links to get it installed, and afterwards I didn't remember how exactly I did it. The problem was that all of the packages and concepts associated with the installation (vtk,tvtk,traits,setuptools,eggs,...) were completely new to me (and some servers were down). For a complete beginner, I think it's nice to just install a .exe file and forget about the details. I now added a small paragraph on EPD on the wiki...I hope you don't mind me putting the python(x,y) link there.
By the way, does the EPD distribution also feature a python editor (IDLE)? If yes, can I create a TVTK scene from the IDLE interactive console there (does it support wxPython threading system)?
Greetings,
Thomas
Ps. Any ideas on the other problem, with the small x,y values? This is by far not as important as the other issue, as the plots are still useful and I can simply give the coordinates in micrometers so they are around 1e0, but still it would be nice to have the option to use small x,y :)
On Wed, Jul 16, 2008 at 11:57:56PM +0200, Thomas Königstein wrote:The good answer is that the latest version of Mayavi (2.2, in ETS 2.8)
> Now, with either method, I have the problem when the values of the x,y
> coordinates are of a different magnitude (i.e. much bigger/smaller) as the
> value of the z- (i.e. my_data)-coordinate. (For example, x,y being
> micrometer --> around 1.e-6 while z is around 1e4, or x,y being
> [1,2,3,...] while z is ~1e-10) So when I view the plot, I get either a
> thin line when my_data is much bigger than x,y; or I get a flat plane when
> my_data is negligible compared to x,y. Only when they by chance happen to
> have the same magnitude, the 3d outline is a nice cuboid.
> A solution is to use the "WarpScalar" filter to shrink/expand the z-axis,
> but then the values also change, and the z-axis becomes useless. It's also
> possible to change the "Spacing" for x,y (changing z seems to be broken
> for me here) in the "Array2DSource" object editor, but then the x,y values
> become incorrect. So, my question is: How can I change the height of a
> graph without changing the values?
added a "scale_z" argument that controls the scale of the z axis to do
what you want. By default it auto scales your data. It is not yet in
python(x,y), sorry. You might want to ask Pierre to update python(x,y)
Now what you can do in the mean time is sue the extents keyword argument,
say if you want an 1,1,1 aspect ratio use:
mlab.surf(my_data, extent=[0, 1, 0, 1, 0, 1])
Try this out, and tell us if it does the tric.
Cheers,
Gaël
PS: Another nice way of getting Mayavi2 and Co is to use the enthought
python distribution (www.enthought.com/products/epddownload.php)
_______________________________________________
Enthought-dev mailing list
Enthought-dev-oRDGkvazHdbtRgLqZ5aouw@public.gmane.orgought.com
https://mail.enthought.com/mailman/listinfo/enthought-dev
_______________________________________________ Enthought-dev mailing list Enthought-dev@... https://mail.enthought.com/mailman/listinfo/enthought-dev
RSS Feed