fix pause focus stealing

This commit is contained in:
Oskar Weigl
2018-06-25 18:53:13 -07:00
parent e071221100
commit 71088ffb9c
+2 -4
View File
@@ -69,10 +69,8 @@ def start_liveplotter(get_var_callback):
while not cancellation_token.is_set():
plt.clf()
plt.plot(vals)
if platform.system() == "Windows":
plt.pause(1/plot_rate)
else:
fig.canvas.flush_events()
fig.canvas.draw()
fig.canvas.start_event_loop(1/plot_rate)
threading.Thread(target=fetch_data).start()
threading.Thread(target=plot_data).start()