I am trying to create a graphical interface in TraitsUI that includes two Mayavi digits. I performed these numbers according to a few engine examples in the Mayavi documentation.
However, when I add a color bar to one of the shapes and run the GUI script, it sometimes opens a blank Mayavi script editor window in addition to the desired TraitsUI window. This empty window does not always appear, never in the first run after restarting the python kernel, and sometimes only after running the script several times in a row and closing the windows that appear every time.
Executing the code below leads to the same behavior, and deleting the mlab.colorbar(s) stops the problem. How can I get a color panel without opening blank windows? There seems to be no obvious way to assign a color panel to a specific drawing, as for a surface area. I am running Python 3.5 on Windows 7 (but getting the same problems on Ubuntu).
from traits.api import HasTraits, Instance, on_trait_change from traitsui.api import View, Item import numpy as np from mayavi.core.api import Engine from mayavi.core.ui.api import SceneEditor, MlabSceneModel from mayavi import mlab
Siyh
source share