I\'m learning OOP in python and so for a bit of fun I bashed out a GameOfLife simulator this morning. When it starts up it runs at about 20 cycles per second (due to the p
Before reusing the canvas, you should clear the old figure. You can use matplotlib.pyplot.clf() to clear the current figure (http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.clf):
def plot(self):
plt.clf() # Clear the old figure
im = plt.imshow(self.matrix)
plt.pause(0.05)
Hope this helps! :)