Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf584bd

Browse files
authored
Merge pull request#15901 from anntzer/nbactive
Update backend_nbagg for removal of Gcf._activeQue.
2 parentsbebd7f1 +2692cf8 commitbf584bd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎lib/matplotlib/backends/backend_nbagg.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def connection_info():
3939
formanagerinGcf.get_all_fig_managers()
4040
]
4141
ifnotis_interactive():
42-
result.append('Figures pending show: {}'.format(len(Gcf._activeQue)))
42+
result.append(f'Figures pending show:{len(Gcf.figs)}')
4343
return'\n'.join(result)
4444

4545

@@ -259,12 +259,12 @@ def show(*args, block=None, **kwargs):
259259
formanagerinmanagers:
260260
manager.show()
261261

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
264264
# figures being put as the active figure after they have been
265265
# shown, even in non-interactive mode.
266266
ifhasattr(manager,'_cidgcf'):
267267
manager.canvas.mpl_disconnect(manager._cidgcf)
268268

269-
ifnotinteractiveandmanagerinGcf._activeQue:
270-
Gcf._activeQue.remove(manager)
269+
ifnotinteractive:
270+
Gcf.figs.pop(manager.num,None)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp