I want to be able to get the figure_manager of a created figure: e.g. I can do it with the pyplot interface using:
from pylab import*
figure()
plot(arange(100))
mngr = get_current_fig_manager()
However what if I have a few figures:
from pylab import *
fig0 = figure()
fig1 = figure()
plot(arange(100))
mngr = fig0.get_manager() #DOES NOT WORK - no such method as Figure.get_manager()
however, searching carefully through the figure API, http://matplotlib.org/api/figure_api.html, was not useful. Neither was auto-complete in my IDE on an instance of a figure, none of the methods / members seemed to give me a 'manager'.
So how do I do this and in general, where should I look if there is a pyplot method whose analogue I need in the OO interface?
PS: what kind of an object is returned by get_current_fig_manager() anyway? In the debugger i get:
type(get_current_fig_manager())
<type 'instance'>
which sounds pretty mysterious...