MPL with PyQt: different behavior on Windows vs. Linux

There is definitely something weird going on here. It could still be a bad command on my part, but I cannot get Windows to plot interactively if I embed it in pyqt. I even tried adapting one of the qt examples from the matplotlib homepage and I still have the same problem (i.e., it will only plot point by point in Linux). I’m attaching two files to illustrate: (1) a simple program that works interactively in both Windows and Linux without qt; and (2) the example from the homepage with my code inserted (which is the same code that I used in the first attachment that behaves properly). I’m wondering if there is some issue with qt and Windows at work.
Any thoughts?
Steve (210 Bytes) (3.76 KB)


— On Tue, 6/9/09, John Hunter <jdh2358@…287…> wrote:

From: John Hunter <jdh2358@…287…>
Subject: Re: [Matplotlib-users] MPL with PyQt: different behavior on Windows vs. Linux
To: “Steve Nicholes” <emailaddress_scn@…9…>
Date: Tuesday, June 9, 2009, 6:25 PM

On Tue, Jun 9, 2009 at 5:17 PM, Steve > Nicholes<emailaddress_scn@…9…> wrote:

I am writing some code for automated testing via GPIB using MPL and PyQt.
To simulate automated data collection while debugging the program, I have
added a for loop (see below) after reading in a data file that plots each
point one by one. When I run the program in Linux, I see each point appear
on the canvas one by one as designed, but when I run the
same code in
Windows, nothing shows up on the canvas during the for loop. Instead, once
the loop has completed, all points appear simulataneously. Is there any
reason the why calls to canvas.draw() show nothing when run in Windows? I’m
really lost on this one and would appreciate it someone can tell me what I’m
doing wrong. If you need more info on what I’m doing, please let me know.

It would help if we could see the whole program. Ie, I assume this is
a pure qt app with no import of pyplot/pylab, but w/o seeing any code
I cannot be sure. Also, check the qt examples at

and see if they work on windows. If so, perhaps you can borrow
inspiration from them. If not, perhaps we
need to do something
different for qt/windows animation.