[wingide-users] wing IDE and matplotlib Interactive mode support

Mark Assad massad at gmail.com
Tue Nov 4 00:00:49 MST 2008


    I've been trying to use the interactive mode of matplotlib with
Wing IDE without any luck. I was wondering if anyone had any
suggestions of how to get this combination to work correctly.

    I've been running this example on Windows XP, Python 2.5, Wing IDE
3.1.4, matplotlib 0.98.3

the code that seems to fail is: (from the Python Shell)

import matplotlib
from pylab import *

At this point, i would have expected to see a simple graph with a line
on the screen which i can interact with. The graph appears, but it's
frozen .. None of the buttons seem to work.

I'm using the Tk backend with matplotlib, so what I have tried is:

from Tkinter import Tk
w = Tk()

This creates a dummy Tk window that allows me access to the message
loop. I can kick the matplotlib windows and cause them to update with:


Each time I call the update() method, the windows will re-draw and the
any outstanding mouse events are processed.

This goes halfway to solving my problem, but I'd like the update to
happen automatically.

Is there any way to get both the python shell + the debug probe to
call the update function on when the Wing IDE gui is idle?


More information about the wingide-users mailing list