22 Jul 23:10
Re: Modify surf output (axes, scaling)
From: Thomas Königstein <thkoe002@...>
Subject: Re: Modify surf output (axes, scaling)
Newsgroups: gmane.comp.python.enthought.devel
Date: 2008-07-22 21:10:46 GMT
Subject: Re: Modify surf output (axes, scaling)
Newsgroups: gmane.comp.python.enthought.devel
Date: 2008-07-22 21:10:46 GMT
Thanks Gael. Pierre already supplied me with a ETS 2.8 build, the decorations.py is identical to the one you attatched in your mail.
Now, the plot looks better in terms of aspect ratio, but the axes don't fit: http://i37.tinypic.com/2jayljn.png <- the values go from 0 to 50, but the axes obviously are too large. (to reconstruct: "from numpy import array;from enthought.mayavi.mlab import surf;surf(array([[x*x+y*y for x in range(-5,5)] for y in range(-5,5)]))" )
Also,is it possible to activate some kind of polynomial/spline interpolation instead of linear? the enthought.tvtk.tools.mlab.SurfRegular method seems to do this: http://i35.tinypic.com/2wnyb2a.png <- the surface looks more "smooth"
Anyways, thanks again, cheers
Thomas
On Fri, Jul 18, 2008 at 16:57, Gael Varoquaux <gael.varoquaux-t+5nXNeJE7o5viHyz3+zKA@public.gmane.org> wrote:
On Fri, Jul 18, 2008 at 10:41:54AM +0200, Thomas Königstein wrote:> zeros;g=zeros((5,5));g[0][0]=1e5;plott=surf(g,extent=[0,3,0,3,0,6]);[1]plott.name="p336";axes(name="p336",extent=[0,3,0,3,0,6])
> Hi again. I tried to pass the extent argument to the axes, but as a result
> the program breaks. Here's what I did:
> from enthought.mayavi.mlab import surf,axes;from numpy import
No :(. This is a bug we fixed recently. I had forgotten about it.
> Frame Based Inspector says "Exception: 'Axes' object has no attribute
> 'actor'", pointing at the mayvi tools.py (def _set_extent method)
> Did I miss something?
> [2]http://code.enthought.com/enstaller/eggs/windows/xp/ or in the
> And, again, how can I/Pierre from pythonxy update mayavi2 to version
> 2.8? It's not on
> EPD package...
I can't help you here. I don't have a windows box available right now (I
am travelling), and anyhow, I really don't know how to build these
packages under windows. I know Pierre tried, and failed when it came to
building kiva.
What we can do, is try to backport these modifications. I have attached a
"decorations.py", which you should put in you
"python25/lib/site-packages/enthought.mayavi/enthought/mayavi/tools/"
directory (backup the existing decorations.py, just in case this break
everything). Hopefully this will get axes working properly. I haven't had
time to have a look at this closely, and I must run right now.
Cheers,
Gaël
_______________________________________________
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