From 0965958ea90e9737c5cd7f2217b9a588d92818f3 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 17 Dec 2019 10:36:27 +0100 Subject: [PATCH] Backport PR #15901: Update backend_nbagg for removal of Gcf._activeQue. --- lib/matplotlib/backends/backend_nbagg.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/matplotlib/backends/backend_nbagg.py b/lib/matplotlib/backends/backend_nbagg.py index 5530d5691fdf..1a9efadefd1f 100644 --- a/lib/matplotlib/backends/backend_nbagg.py +++ b/lib/matplotlib/backends/backend_nbagg.py @@ -40,7 +40,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) @@ -260,12 +260,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