Hi,
I'm trying to embed a Matplotlib graph along with the toolbar in my Tkinter
application.
The problem I'm facing is that when I maximize the application, the plot
only fills the
top half of the screen and the bottom half is taken up by the toolbar with
a lot of whitespace.
I based my code on the embedding_with_tk examples, and I've tried every
layout combination
with pack(), but I still can't get just the plot to take up all the space.
This is the relevant code:
f2 = Tkinter.Frame(n())
canvas = FigureCanvasTkAgg(f, master=f2)
canvas.show()
canvas.get_tk_widget().pack(side=Tkinter.TOP, fill=Tkinter.BOTH,
expand=1)
toolbar = NavigationToolbar2TkAgg(canvas, f2)
toolbar.update()
canvas._tkcanvas.pack(side=Tkinter.BOTTOM, fill=Tkinter.BOTH,
expand=0)
Any help would be welcome.
Thanks,
KK
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users