matplotlib and PyQt

Hello,

I'm searching for informations about using matplotlib interactively with PyQt. I
would like for example to move line with the mouse.

Why do you want to use PyQt and not wxwidgets?

···

On Jan 14, 2009, at 8:19 AM, projetmbc@...748... wrote:

Hello,

I'm searching for informations about using matplotlib interactively with PyQt. I
would like for example to move line with the mouse.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Hello,

I'm searching for informations about using matplotlib interactively with PyQt. I
would like for example to move line with the mouse.

Start with the tutorial at

  http://matplotlib.sourceforge.net/users/event_handling.html

it has a draggable rectangle example. matplotlib has its own even
model, so you do not need to use qt events explictly. For example,
Paul Ivanov recently wrote pong using the matplotlib event system, and
then provided a gtk and qt version of them that requires no additional
gui programming save for starting up the window and event loop. See
attached. Paul's original message is below:

Hi John,

I got a little carried away in the berkeley py4science group a few weeks
back when we were looking into different possibilities for doing
animation in python.

Attached is a working implementation (scoreboard included) of pong
that's easily portable to different backends (I made a gtk and qt version).

Fernando thought you'd get a kick out of it, let me know if you think
it'd be worthwhile to include in matplotlib so I could clean it up some.

the instructions with all of the keys pop up at the beginning (but they
slow down the animation the most), you can press 't' to toggle showing
the instructions.

you can press 'g' to toggle showing the game in progress, 'a' to add a
puck into play, and 'n' to remove the distracting sinusoids.

best,
Paul Ivanov

pipong.py (8.71 KB)

pong_gtk.py (772 Bytes)

pong_gtk.py (772 Bytes)

···

On Wed, Jan 14, 2009 at 10:19 AM, <projetmbc@...748...> wrote:
From: Paul Ivanov
To: me, Fernando

Simson Garfinkel wrote:

Why do you want to use PyQt and not wxwidgets?
  

maybe because the Qt license changed ?
That's a reason for me to be interested in the answer.

cheers,
Stef

Oops, accidentally attached the gtk version twice and not the qt
version -- here are the relevant files

pipong.py (8.71 KB)

pong_qt.py (975 Bytes)

pong_gtk.py (772 Bytes)

···

On Wed, Jan 14, 2009 at 11:28 AM, John Hunter <jdh2358@...287...> wrote:

Paul Ivanov recently wrote pong using the matplotlib event system, and
then provided a gtk and qt version of them that requires no additional
gui programming save for starting up the window and event loop.