##// END OF EJS Templates
Gcf.get_active() can return None...
MinRK -
Show More
@@ -122,8 +122,10 b' def draw_if_interactive():'
122 # execution. Also sets the _draw_called flag, signaling that there will be
122 # execution. Also sets the _draw_called flag, signaling that there will be
123 # something to send. At the end of the code execution, a separate call to
123 # something to send. At the end of the code execution, a separate call to
124 # flush_figures() will act upon these values
124 # flush_figures() will act upon these values
125
125 manager = Gcf.get_active()
126 fig = Gcf.get_active().canvas.figure
126 if manager is None:
127 return
128 fig = manager.canvas.figure
127
129
128 # Hack: matplotlib FigureManager objects in interacive backends (at least
130 # Hack: matplotlib FigureManager objects in interacive backends (at least
129 # in some of them) monkeypatch the figure object and add a .show() method
131 # in some of them) monkeypatch the figure object and add a .show() method
General Comments 0
You need to be logged in to leave comments. Login now