Yes, the example I gave was run from a regular python interpreter.  I
was trying to use the simplest case possible, and ended up introducing
confusion - my apologies.  I'm aware of the GUI threading issues
involved, and had actually first encountered this problem from ipython.
Again, sorry to be causing confusion.

The screen refresh is not really the problem I was after here.  If I add
'mlab.show()' to my example, I still get a black screen (which does
redraw, even in a regular interpreter) that blocks the interactive
python thread (which doesn't matter for this example).  After doing a
bit more digging, I think the problem is that the default foreground and
background color are both set to black.  If I modify the example like
so:

python
>>> from mayavi import mlab
>>> mlab.figure(bgcolor=(0.5,0.5,0.5))
<mayavi.core.scene.Scene object at 0xbe92a4c>
>>> mlab.points3d(0,0,0,color=(1,0,0))
<mayavi.modules.glyph.Glyph object at 0xbe92d1c>
>>> mlab.show()

I get a fully interactive window with a red sphere in the middle, as
expected.

I should note that I have a local install (to ${HOME}/.local) of numpy
1.6.1, and have tweaked PYTHONPATH such that this is what gets loaded
when I do import numpy (I really really need einsum).  I doubt this
could be breaking mayavi, but figured I should disclose it to be sure.

This problem can certainly be worked around, but it is very annoying.
Any tips on where the default colors can be set?  My suspicion is that
this is just a packaging bug.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/916307

Title:
  mayavi2 drawing of plot broken

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mayavi2/+bug/916307/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to