0

Hey everyone, I've tried extensively to find a thread like this already, so I hope it's not a repose.

Basically, I have a program with a nice GUI (Tkinter) which has a frame which takes in matplotlib figures. I am able to connect the plots to the Tkinter frame this way:

def graph_area(self, frame):
		'''Used to store parameters'''
		self.graphframe = Frame(frame)
		self.graphframe.pack(side = RIGHT)
		self.f = Figure(figsize=(5,4), dpi=100)
		self.ax1 = self.f.add_subplot(111)
		self.canvas = FigureCanvasTkAgg(self.f, self.graphframe)
		self.canvas.get_tk_widget().pack(side=TOP, fill=BOTH, expand=1)

This works very nicely; however, I would really like to have the flexibility to incorporate mlab plots into this frame interchangably. Basically, the pylab canvas is plugged right into the tkinter frame; hwoever, I don't know of a way to do with with mlab. There is some documentation how to embed mlab into a Wx or Qt program, as well as how to customize mlab call backs.

http://github.enthought.com/mayavi/mayavi/building_applications.html

Unfortunately, these don't explain if tkinter explicitly has any support for such an application. I suppose I could run the mlab programs in popup windows which aren't integrated into the frames directly; however, this is not preferred. Any help would be so greatly appreciated.

1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by hughesadam_87
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.