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

Appearance settings

Commit 2c9a85b

Browse filesBrowse files
solve nbagg recursion bug within nbagg
1 parent 673afe7 commit 2c9a85b
Copy full SHA for 2c9a85b

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎lib/matplotlib/backends/backend_nbagg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_nbagg.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,12 @@ def new_figure_manager_given_figure(num, figure):
231231
if is_interactive():
232232
manager.show()
233233
figure.canvas.draw_idle()
234-
canvas.mpl_connect('close_event', lambda event: Gcf.destroy(manager))
234+
235+
def destroy(event):
236+
canvas.mpl_disconnect(cid)
237+
Gcf.destroy(manager)
238+
239+
cid = canvas.mpl_connect('close_event', destroy)
235240
return manager
236241

237242
@staticmethod

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.