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 188d7a1

Browse filesBrowse files
committed
DOC: protect against non-gui backends in demo
1 parent 8f2b84c commit 188d7a1
Copy full SHA for 188d7a1

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+4
-2
lines changed

‎examples/pylab_examples/system_monitor.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/system_monitor.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ def get_stats():
4747
pm.set_height(m)
4848
pc.set_height(c)
4949
pn.set_height(n)
50-
51-
fig.canvas.flush_events()
50+
try:
51+
fig.canvas.flush_events()
52+
except NotImplementedError:
53+
pass
5254

5355
stop = time.time()
5456
print("{fps:.1f} frames per second".format(fps=200 / (stop - start)))

0 commit comments

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