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

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


Hi,

    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
matplotlib.interactive(True)
from pylab import *
plot([1,2,3,4])

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()
w.withdraw()

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:

w.update()

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?

Thank-you,
Mark


More information about the wingide-users mailing list