If I'm understanding your question correctly and reading your code correctly, you're asking why the timer method of doing things works, but the principal() while loop method does not.
I had a couple solutions that involved the main event loop, but I just noticed 2 main things that are probably wrong with your code: 1. You are calling 'principal' from inside __init__ so you never actually return from __init__ which means that you never call "window.show()" and therefore never call "qApp.exec_()". If you really want to use the 'principal' method you would have to connect it to a one shot timer anyway to have it run after you have started the application ('qApp.exec_()'). I think the recommended way would be to use the timer the way you did in your latest email. 2. At least in the way my email client reads your original code, your calls to the matplotlib drawing functions aren't inside the while loop and the while loop never ends...although this doesn't matter if you don't fix #1 above. Hope that made sense. -Dave On 12/5/11 1:44 PM, matplotlib-users-requ...@lists.sourceforge.net wrote: > Message: 3 > Date: Mon, 5 Dec 2011 15:46:02 +0100 > From: Fabien Lafont<lafont.fab...@gmail.com> > Subject: Re: [Matplotlib-users] [ploting data] Live data > Cc:matplotlib-users@lists.sourceforge.net > Message-ID: > <CAC9H_cjrgQBE6e6+jzZHyfYHonTeAg0XwU7c_2G-hu=s+z7...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Thx all for your remarks, > > I can't understand why this code works (when I use the timer method): ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users