TkAgg in a Tkinter GUI frame?

I've been poking aroung a bit trying to see if I can locate

    > my plots in a frame in my own Tkinter GUI rather than a
    > stand-alone window.

    > It looks like it might be possible if I can, for example,
    > extract the frame instance from a TkAgg plot (or something
    > like that)

    > Can anyone comment or suggest a route?

Todd, is this easily doable? Could you write an embedding_in_tk.py
example along the lines of embedding_in_gtk and embedding_in_wx?

The FigureCanvas derived instance in backend_* is meant to be a widget
you could plug into a GUI, but I notice you took a different tack in
backend_tkagg. The idea behind this is that users may want to embed a
figure as part of a GUI window, eg in a widget container, without
necessarily bringing the toolbar along or using the whole window.
Would this be an easy refactoring of backend_tkagg?

Thanks,
JDH

    > I've been poking aroung a bit trying to see if I can locate
    > my plots in a frame in my own Tkinter GUI rather than a
    > stand-alone window.

    > It looks like it might be possible if I can, for example,
    > extract the frame instance from a TkAgg plot (or something
    > like that)

    > Can anyone comment or suggest a route?

First an apology. I didn't see this until late yesterday when Perry
alerted me. I wasn't subscribed to matplotlib-users.

Todd, is this easily doable?

Frankly, I'm not sure. I'll try to work it out this afternoon. I
imagine if it's possible in GTK it's possible in Tk.

Could you write an embedding_in_tk.py
example along the lines of embedding_in_gtk and embedding_in_wx?

I'll try and let you know.

The FigureCanvas derived instance in backend_* is meant to be a widget
you could plug into a GUI, but I notice you took a different tack in
backend_tkagg. The idea behind this is that users may want to embed a
figure as part of a GUI window, eg in a widget container, without
necessarily bringing the toolbar along or using the whole window.
Would this be an easy refactoring of backend_tkagg?

We'll see.

Regards,
Todd

···

On Tue, 2004-03-16 at 07:29, John Hunter wrote:

--
Todd Miller <jmiller@...86...>

    > I've been poking aroung a bit trying to see if I can locate
    > my plots in a frame in my own Tkinter GUI rather than a
    > stand-alone window.

    > It looks like it might be possible if I can, for example,
    > extract the frame instance from a TkAgg plot (or something
    > like that)

    > Can anyone comment or suggest a route?

Todd, is this easily doable?

As we all hoped, this was easy and is now in CVS. I refactored
FigureManagerTkAgg and added FigureCanvasTkAgg to support the new
functionality. FigureCanvasTkAgg defines get_tk_widget() to return
whatever tk widget is used to implement it. Currently it returns a Tk
canvas but I thought it would be best not to assume that will always be
the case. Like other Tk widgets, FigureCanvasTkAgg wants to be told
who its parent widget (master) is at construction time.

Could you write an embedding_in_tk.py
example along the lines of embedding_in_gtk and embedding_in_wx?

This is also in CVS.

Regards,
Todd

···

On Tue, 2004-03-16 at 07:29, John Hunter wrote:

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Todd Miller <jmiller@...86...>