I'm trying to produce a plot in a loop that updates itself every iteration. Working in a linux environment with python 2.6.6 I have it working, but when I run the same code in windows XP with python 2.7.3 it fails. Minimal code that has produced this error for me is:
import matplotlib.pyplot as plt
plt.ion()
plt.figure(1)
for i in range(10):
plt.clf()
plt.plot(i,i**2,'bo')
plt.axis([-1,10, -1, 90])
plt.draw()
In linux I see a blue dot that moves itself along a parabola. In MSwindows I get an empty window to begin with and then a plot with a point at (9,81) appears. This seems pretty straightforward, but maybe I'm missing something small. Any suggestions?