On Wed, Jan 14, 2009 at 10:19 AM, <projetmbc@...> wrote:
> 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
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:
From: Paul Ivanov
To: me, Fernando
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
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.