ya que estoy en cero reputación No puedo dejar ninguna otra marca que una nueva respuesta Estoy en Windows (WIN7), ejecutando Python 2.7.5 & Matplotlib 1.3.1
I fue capaz de maximizar Figura ventanas para TkAgg, QT4Agg, y wxAgg usando las siguientes líneas:
from matplotlib import pyplot as plt
### for 'TkAgg' backend
plt.figure(1)
plt.switch_backend('TkAgg') #TkAgg (instead Qt4Agg)
print '#1 Backend:',plt.get_backend()
plt.plot([1,2,6,4])
mng = plt.get_current_fig_manager()
### works on Ubuntu??? >> did NOT working on windows
# mng.resize(*mng.window.maxsize())
mng.window.state('zoomed') #works fine on Windows!
plt.show() #close the figure to run the next section
### for 'wxAgg' backend
plt.figure(2)
plt.switch_backend('wxAgg')
print '#2 Backend:',plt.get_backend()
plt.plot([1,2,6,4])
mng = plt.get_current_fig_manager()
mng.frame.Maximize(True)
plt.show() #close the figure to run the next section
### for 'Qt4Agg' backend
plt.figure(3)
plt.switch_backend('QT4Agg') #default on my system
print '#3 Backend:',plt.get_backend()
plt.plot([1,2,6,4])
figManager = plt.get_current_fig_manager()
figManager.window.showMaximized()
plt.show()
Hope este resumen de las respuestas anteriores (y algunas adiciones) combinados en un ejemplo de trabajo (por lo menos para ventanas) ayuda. Cheers
Usando esto, obtengo 'mng.frame.Maximize (True) AttributeError: la instancia de FigureManagerTkAgg no tiene atributo 'frame'' en Matplotlib 1.2.0 – Junuxx
lo anterior funciona en Windows, estás en una Mac? – gg349
No, estoy en Windows. – Junuxx