|
From: Eli G. <eg...@se...> - 2004-12-15 23:38:41
|
Thanks, John! That's exactly what I was looking for
I'm using the WX backend and I was able to do:
figure(1)
plot([1,2,3])
manager = get_current_fig_manager()
manager.window.SetPosition((100,100))
#or
manager.window.Centre()
Eli
> Eg for the GTK backend, for example, you could do
>
> from pylab import *
>
> import gtk
>
> figure(1)
> plot([1,2,3])
> manager = get_current_fig_manager()
>
> # see gtk.Window class docs at
> # http://www.pygtk.org/pygtk2reference/class-gtkwindow.html
> manager.window.set_position(gtk.WIN_POS_CENTER)
>
> figure(2)
> plot([1,2,3])
> manager = get_current_fig_manager()
>
> # see gtk.Window class docs at
> # http://www.pygtk.org/pygtk2reference/class-gtkwindow.html
> manager.window.set_position(gtk.WIN_POS_NONE)
>
> show()
>
> For the WX* backend, manager.window is a wxFrame -
>
http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin_wxframe.html#wxframe
>
> For the TkAgg backend, manager.window is a Tkinter.Tk instance -
> http://starship.python.net/crew/fredrik/tkclass/ClassToplevel.html
>
> Off the top of my head I don't know the right incantation for each
> backend, but hopefully the classdocs I referenced above will help.
> Perhaps Todd or Matthew can chime in with more Tk and WX information.
>
> While this arrangement may be suboptimal, we are resisting the urge to
> become a GUI library. The temptations to abstract GUI functions for
> use in matplotlib are many, and we are trying to keep this to a
> manageable core (some event handling, some basic window management,
> etc.). It's been on my list of things to do to investigate anygui,
> however - http://anygui.sourceforge.net - which would appear to solve
> our problems but might require a substantial refactoring of the
> matplotlib backends.
>
> If you want full GUI control, you can embed matplotlib in your own GUI
> application, following one of the many embedding_in_*.py examples in
> the examples subdirectory of the matplotlib src distribution.
>
> If you come up with example code for your backend, please post it to
> the list.
>
> JDH
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|