@@ -39,7 +39,7 @@ def connection_info():
39
39
for manager in Gcf .get_all_fig_managers ()
40
40
]
41
41
if not is_interactive ():
42
- result .append ('Figures pending show: {}' . format ( len (Gcf ._activeQue )) )
42
+ result .append (f 'Figures pending show:{ len (Gcf .figs ) } ' )
43
43
return '\n ' .join (result )
44
44
45
45
@@ -259,12 +259,12 @@ def show(*args, block=None, **kwargs):
259
259
for manager in managers :
260
260
manager .show ()
261
261
262
- # plt.figure adds an event whichputs the figure in focus
263
- #in the activeQue . Disable this behaviour, as it results in
262
+ # plt.figure adds an event whichmakes the figure in focus the
263
+ #active one . Disable this behaviour, as it results in
264
264
# figures being put as the active figure after they have been
265
265
# shown, even in non-interactive mode.
266
266
if hasattr (manager ,'_cidgcf' ):
267
267
manager .canvas .mpl_disconnect (manager ._cidgcf )
268
268
269
- if not interactive and manager in Gcf . _activeQue :
270
- Gcf ._activeQue . remove (manager )
269
+ if not interactive :
270
+ Gcf .figs . pop (manager . num , None )