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 6757719

Browse filesBrowse files
authored
Merge pull request #8305 from anntzer/blocking-input-for-unmanaged-figures
In ginput(), don't call show() if we can't.
2 parents fc6a7ba + a62e8be commit 6757719
Copy full SHA for 6757719

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎lib/matplotlib/blocking_input.py

Copy file name to clipboardExpand all lines: lib/matplotlib/blocking_input.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ def __call__(self, n=1, timeout=30):
101101
self.events = []
102102
self.callbacks = []
103103

104-
# Ensure that the figure is shown
105-
self.fig.show()
104+
if hasattr(self.fig, "manager"):
105+
# Ensure that the figure is shown, if we are managing it.
106+
self.fig.show()
106107

107108
# connect the events to the on_event function call
108109
for n in self.eventslist:

0 commit comments

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