[SciPy-user] Mlab doesn't work

Alexander Borghgraef alexander.borghgraef.rma@gmail....
Fri Jun 13 07:16:08 CDT 2008


Hi all,

 I've been playing a bit with mayavi2/mlab, but I run into a problem
when trying to run the first example at
http://www.scipy.org/Cookbook/MayaVi/mlab:

  import scipy

  # prepare some interesting function:
  def f(x, y):
      return 3.0*scipy.sin(x*y+1e-4)/(x*y+1e-4)

  x = scipy.arange(-7., 7.05, 0.1)
  y = scipy.arange(-5., 5.05, 0.1)

  # 3D visualization of f:
  from enthought.tvtk.tools import mlab
  fig = mlab.figure()
  s = mlab.SurfRegular(x, y, f)
  fig.add(s)

I get the following messages:

  mlabtest.py:3: DeprecationWarning: The wxPython compatibility
package is no longer automatically generated or actively maintained.
Please switch to the wx package as   soon as possible.
    from wxPython.wx import *

Then a blank gtk window pops up, disappears, and then I get:

  (python:4960): Gtk-CRITICAL **: gtk_widget_set_colormap: assertion
`!GTK_WIDGET_REALIZED (widget)' failed

I've built the enthought libraries from source on an Fedora 8 system,
and installed them in a local directory (I have no access to
/usr/lib). Importing the libraries works fine, and so does running the
mayavi2 binary, but I haven't managed to get something plotted from a
python script. Any ideas?

-- 
Alex Borghgraef


More information about the SciPy-user mailing list