test.py 351 Bytes
Newer Older
Jérémy Baudry's avatar
Jérémy Baudry committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/env python



import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation

plt.ion()
img = np.random.rand(40,40)
fig=plt.figure(1)
image = plt.imshow(img,interpolation='nearest',animated=True,label="blah")

for k in range(1,10000):
     img = np.random.rand(40,40)
     image.set_data(img)
     plt.draw()