Re: Modify surf output (axes, scaling)
Subject: Re: Modify surf output (axes, scaling)
Newsgroups: gmane.comp.python.enthought.devel
Date: 2008-08-04 22:02:59 GMT
> Yes, sorry about that. Use the "add_child" method.
>
> What platform are you on? It woul be nice to get you to a newer version
> of Mayavi. It would make your life easier.
I'm on Windows XP home edition, SP2, I got this mayavi version from pythonxy.com. And yes I'd like to try a easier-to-use version of mayavi :)
In terms of usability, my problem with mayavi is that most of the time I'm trying to figure out how certain methods/functions/modules work by looking at their __doc__ and their subclasses via autocomplete or dir(...); that way I learned for example some of numpy or PIL. But in mayavi, there are always dozens of subclasses, which have no obvious use for me... enable_traits, configure_traits, tno_can_delete_me, .... most of them probably aren't meant to be used by the "end-user", but still they are there and confuse me :/
> > And the other thing, with the quiver3d plot, I just want to move a plot
> > spatially. For example:
>
> > from enthought.mayavi.mlab import quiver3d;from numpy import
> > random;a=quiver3d(*array([random.random(40) for i in
> > range(6)]));b=quiver3d(*array([random.random(40) for i in range(6)]))
>
> > gives me two "bunches" of vectors, both at the same location. How can I
> > now seperate one from the other?
>
> That is what the extent keyword argument is for. Just give two extents
> located in different regions. Does that make sens?
Well, yes, but my problem was that I have an existing plot in the scene, and I want to move it after it has been created. With a Surface, this is possible by clicking on Data2DSource->Data->Origin in the scene explorer, but there is no equivalent for Vectors. There is a "Whole Extent" and "Update Extent" field, but changing their values has no effect for me.
The extent keyword works, however. I'm just not sure, how :) what does each of the six values do? I guess they construct three points which define a cuboid where the vectors are stuffed into, but I couldn't quite get it right yet.. extend(0,0,0,0,0) for example does nothing.
And another thing: in my example, I used quiver3d(*array(...)). The asterisk somehow turns an array of n arrays into n arrays, as it seems. But whereas quiver3d(*array(...)) works, a=*array(....) does not. Also, quiver3d(*array(...), extent=(..)) does not work. This is not a problem with mayavi, it's just my lack of knowledge concerning numpy. I must have read the *array thing somewhere, but now I have forgotten where that was, and googling for * isn't so easy :)
Well, thanks again for your help. Mayavi is an amazing piece of software, as you can see my critique is coming from someone with really small experience in python.
Thumbs up, bye
Thomas
_______________________________________________ Enthought-dev mailing list Enthought-dev@... https://mail.enthought.com/mailman/listinfo/enthought-dev
RSS Feed