matplotlib에서 닫힌 그림 (즉, 사용자 X 명)을 다시 열 수 있습니까? 나는 거기에 위젯 그림을 만들려고 해요 그래서 해결 방법을 사용할 수있다 (다만 새로운 그림을),하지만 난 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- 닫힌) –