split plotting behaviour across windows and notwindows

This commit is contained in:
Oskar Weigl
2018-04-13 17:17:24 -07:00
parent 2f5f6ead9c
commit 687fdabbc0
+4 -3
View File
@@ -65,9 +65,10 @@ def start_liveplotter(get_var_callback):
while not cancellation_token.is_set():
plt.clf()
plt.plot(vals)
#time.sleep(1/plot_rate)
fig.canvas.flush_events()
plt.pause(1/plot_rate)
if platform.system() == "Windows":
plt.pause(1/plot_rate)
else:
fig.canvas.flush_events()
threading.Thread(target=fetch_data).start()
threading.Thread(target=plot_data).start()