2010/3/24 Jonno <jonnojohn...@gmail.com>: > Well I realized my error with the extra window being caused by the > TopLevel() command. I switched this to Tk.Tk() and it works nicely. > However I still have to pack the frame instead of using grid. I can > work around this but I wonder if there isn't something else I'm > missing.
If I'm not completely mistaken you can .grid() your Frame as well, but you might have to .columnconfigure() and/or .rowconfigure() the Tk instance with argument weight = 1 or something integer positive, to make the row containing the plot not collapse to zero? The main problem is, that the NavigationToolbar2TkAgg actually in matplotlib.backends.backend_tkagg.py:681 calls self.pack(side = Tkinter.BOTTOM, fill = Tk.X), where the toolbar is actually derived from Tkinter.Frame. This means, subclass and overload, or: toolbar_frame = Tkinter.Frame(tl) toolbar_frame.grid(column = 0, row = 1) toolbar=NavigationToolbar2TkAgg(canvas, toolbar_frame) Now I see why your script hangs, because when you try to pack() and grid() widgets to the same master, Tk somehow hangs up without error message, weird if you ask me. But this I encounter often. hth, Friedrich ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users