|
From: | Activecat |
Subject: | Re: [Discuss-gnuradio] matplotlib runtime error |
Date: | Mon, 19 May 2014 11:06:49 +0800 |
On Sun, May 18, 2014 at 9:00 AM, Marcus Müller <address@hidden> wrote:
Hi,
I think real-time and matplotlib kind of contradict in the first place - really, matplotlib's performance is terrible. As a rule, it's Assisi generally a bad idea to let your data file update your GUI. Usually, you want something like a check every tenth of a second, if data has arrived, and then updating your GUI accordingly. Otherwise, you will either end up with refresh rates that are unnecessarily high (e.g. 200fps) or a GUI not reacting to events (e.g. resizing) by redrawing. So that's two things bad about your approach.
As I explained, you'll have a hard time getting GUI to run in a block, since by principle, GR blocks can not run in the main thread, and things like Tim's qwt plot go through death, wind, fire and message passing to get data out of the blocks' threads and into the GUI thread.
Anyway, with matplotlib and pyqt to wrap the canvas in a qt application and a little googling you can hack together guis that should work with the qt generate option - no guarantee though. I'd rather get used to qwt in most cases than stick with matplotlib...
Greetings,
MarcusI agree with Marcus. Don't try and use/abuse matplotlib for this purpose. I pointed to Tim's repo of PyQT/QWT blocks to show you how to use those tools to build GUIs in Python blocks.Tom
[Prev in Thread] | Current Thread | [Next in Thread] |