We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0bbc091 + 188d7a1 commit 5cadac1Copy full SHA for 5cadac1
examples/pylab_examples/system_monitor.py
@@ -40,12 +40,17 @@ def get_stats():
40
ax.set_ylabel('Percent usage')
41
ax.set_title('System Monitor')
42
43
+start = time.time()
44
for i in range(200): # run for a little while
45
m, c, n = get_stats()
46
47
pm.set_height(m)
48
pc.set_height(c)
49
pn.set_height(n)
- ax.set_ylim([0, 100])
50
+ try:
51
+ fig.canvas.flush_events()
52
+ except NotImplementedError:
53
+ pass
54
- plt.draw()
55
+stop = time.time()
56
+print("{fps:.1f} frames per second".format(fps=200 / (stop - start)))
0 commit comments