matplotlibで閉じた図(つまり、ユーザXの1つ)を再び開くことはできますか?私は、その中にウィジェットを持つフィギュアを作成しようとしているので、回避策が利用可能である(ちょうど新しいフィギュアを作る)が、私はfigure
かどうかを知りたいMatplotlib:閉じた図を再度開きますか?
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
:次のコードは単純なアプローチを示していインスタンスは閉じた後も全く役に立たない。
[Matplotlib:閉鎖された図を表示する方法](http://stackoverflow.com/questions/31729948/matplotlib-how-to-show-a-figure-that-has-been-閉鎖) –