E 'possibile riaprire una figura chiusa (vale a dire, l'utente X'd) in matplotlib? Il codice seguente mostra l'approccio ingenuo:Matlota: riaprire una figura chiusa?
In [14]: fig = figure(10)
In [15]: close(fig)
In [16]: fig.show()
Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 1410, in __call__
return self.func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 495, in callit
func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py", line 253, in idle_draw
self.draw()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py", line 239, in draw
tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/tkagg.py", line 19, in blit
tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, id(bbox_array))
TclError: this isn't a Tk application
Sto cercando di creare una figura con i widget in esso, in modo da una soluzione è disponibile (solo fare una nuova figura), ma mi piacerebbe sapere se il figure
l'istanza è totalmente inutile dopo essere stata chiusa.
possibile duplicato di [Matlota: come mostrare una figura che è stata chiusa] (http://stackoverflow.com/questions/31729948/matplotlib-how-to-show-a-figure-that-has-been- chiuso) –