Using matplotlib in Qt4/Qt4 Designer

Hi All,

I’d like to use a matplotlib widget in a GUI app I’m working on. I have tried qwt but I know matplotlib a lot better and would like to use it instead. Is there anybody who have done this before? More specifically, does anyone know how to add a matplotlib widget as a custom widget in qt4 designer?

Any help will be greatly appreciated,

Ewald Zietsman

I've never worked with qt (only wx) but have you checked out the qt embedding examples in the /examples/user_interfaces/ directory? Should be a good start. There is also

http://www.scipy.org/Cookbook/Matplotlib/Qt_with_IPython_and_Designer

from the matplotlib cookbook which seems to address embedding a matplotlib widget using Designer.

Cheers,

-Jonathan Helmus

Ewald Zietsman wrote:

···

Hi All,

I'd like to use a matplotlib widget in a GUI app I'm working on. I have tried qwt but I know matplotlib a lot better and would like to use it instead. Is there anybody who have done this before? More specifically, does anyone know how to add a matplotlib widget as a custom widget in qt4 designer?

Any help will be greatly appreciated,

Ewald Zietsman

Ewald,
It is very much a work in progress (and poorly named) but you can check out a project of mine:
http://code.google.com/p/subplot/
I created a custom matplotlib widget that you can promote from a regular widget in Designer. I hope it helps, let me know if you have any questions. The ui files are also included in the SVN. One thing to note there was a recent change to the Qt backend that altered the nature of the toolbar so you may want to comment that part out if you are using the latest matplotlib. If it is a must have I think I’m sure I could update the code when I find some time (Currently, I’m using v 0.91 I believe). Good luck.
Cheers,
Brian

···

— On Tue, 8/5/08, Ewald Zietsman <ewald.zietsman@…287…> wrote:

From: Ewald Zietsman <ewald.zietsman@…287…>
Subject: [Matplotlib-users] Using matplotlib in Qt4/Qt4 Designer
To: matplotlib-users@lists.sourceforge.net
Date: Tuesday, August 5, 2008, 10:06 AM

Hi All,

I’d like to use a matplotlib widget in a GUI app I’m working on. I have tried qwt but I know matplotlib a lot better and would like to use it instead. Is there anybody who have done this before? More specifically, does anyone know how to add a matplotlib widget as a custom widget in qt4 designer?

Any help will be greatly appreciated,

Ewald Zietsman

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users