diff --git a/lib/matplotlib/backends/backend_nbagg.py b/lib/matplotlib/backends/backend_nbagg.py index 19d3ea589553..8bdf4b626d35 100644 --- a/lib/matplotlib/backends/backend_nbagg.py +++ b/lib/matplotlib/backends/backend_nbagg.py @@ -39,7 +39,7 @@ def connection_info(): for manager in Gcf.get_all_fig_managers() ] if not is_interactive(): - result.append('Figures pending show: {}'.format(len(Gcf._activeQue))) + result.append(f'Figures pending show: {len(Gcf.figs)}') return '\n'.join(result) @@ -259,12 +259,12 @@ def show(*args, block=None, **kwargs): for manager in managers: manager.show() - # plt.figure adds an event which puts the figure in focus - # in the activeQue. Disable this behaviour, as it results in + # plt.figure adds an event which makes the figure in focus the + # active one. Disable this behaviour, as it results in # figures being put as the active figure after they have been # shown, even in non-interactive mode. if hasattr(manager, '_cidgcf'): manager.canvas.mpl_disconnect(manager._cidgcf) - if not interactive and manager in Gcf._activeQue: - Gcf._activeQue.remove(manager) + if not interactive: + Gcf.figs.pop(manager.num, None) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy