2016-11-19 24 views
0

Der folgende Code gibt zwei Bildschirme aus, einen für Tkinter und einen zweiten für mayavi. Wie man mayavi in ​​Tkinter einbindet. Ist es überhaupt möglich? Wenn nicht, welche Alternativen gibt es, um eine GUI zu erstellen, die mayavi plots in einem Frame/Canvas eingebettet hat?Ist es möglich, ein mayavi plot in tkinter einzubetten?

from tkinter import * 
import numpy 
from mayavi.mlab import * 


top = Tk() 


t = numpy.linspace(0, 4 * numpy.pi, 20) 
cos = numpy.cos 
sin = numpy.sin 

x = sin(2 * t) 
y = cos(t) 
z = cos(2 * t) 
s = 2 + sin(t) 

points3d(x, y, z, s, colormap="copper", scale_factor=.25) 

top.mainloop() 

Antwort

Verwandte Themen