I want to plot some data live so I tried this simple example:
import time
import numpy as np
import matplotlib.pyplot as plt
plt.axis([0, 1000, 0, 1])
plt.ion()
plt.show()
for i in range(1000):
print "in"
y = np.random.random()
plt.scatter(i, y)
plt.draw()
time.sleep(0.05)
The plotting window simply opens up, but nothing is ploted on it (the window actually stops responding). I notices it is indeed performing the for cycle since i can se the "in" print output
plt.figure()beforeplt.draw()