From: Ned <a.g...@du...> - 2011-08-11 16:14:18
|
Hi, I'm trying to sort out interactive use with standard python but am having problems. If I do: import matplotlib matplotlib.use("TkAgg") matplotlib.interactive(True) import pylab pylab.ion() pylab.plot([1,2,3,4]) Then I would expect a plot to appear. But it doesn't. I then have to call: pylab.draw() twice before getting the plot (the first call brings up an empty plot window, while the second displays the plot). Then, if I do: pylab.plot([1,2,3,2,3,4,5]) again, it does nothing, until I do pylab.draw() Also the window isn't sensitive to expose events - if it is blocked by another window/minimised etc, then the contents don't reappear, just go blank. So, it is semi-interactive, in that I can use the python command line to add new lines, but I have to call draw each time (which I shouldn't have to), and also it doesn't redraw itself correctly. Can anyone give ideas? I'm running on ubuntu 10.04 32bit, with distro package 0.99 for matplotlib. I haven't been able to find anything that helps online either. Thanks... |