[IPython-dev] Testing matplotlib on IPython trunk

Gökhan Sever gokhansever@gmail....
Tue Sep 8 14:45:56 CDT 2009


The thread switches will be gone by the release of the new IPython. I am
assuming that some extra work needs to be done on both sides in preparation
to the new release. See the following test cases:

### This one locks the IPython unless the figure window is killed. If you do
an additional plt.show() without a figure is up then you get a complete
lock-up of the shell.

I[1]: import matplotlib.pyplot as plt

I[2]: %gui qt

I[3]: plt.plot(range(10))
O[3]: [<matplotlib.lines.Line2D object at 0xab2686c>]

I[4]: plt.show()

### The following cannot resolve that issue

I[5]: %gui   #disable event loops

I[6]: %gui -a qt
O[6]: <PyQt4.QtGui.QApplication object at 0xaa477ac>

I[7]: plt.plot(range(10))
O[7]: [<matplotlib.lines.Line2D object at 0xaf237ac>]

I[8]: plt.show()

### In a new IPython, these lines work --no locking after plt.show() "-a"
makes the difference.

I[1]: import matplotlib.pyplot as plt

I[2]: %gui -a qt
O[2]: <PyQt4.QtGui.QApplication object at 0x8fdceac>

I[3]: plt.plot(range(10))
O[3]: [<matplotlib.lines.Line2D object at 0x9a2c84c>]

I[4]: plt.show()

Platform     :
Python       : ('CPython', 'tags/r26', '66714')
IPython      : 0.11.bzr.r1205
NumPy       : 1.4.0.dev
Matplotlib   : 1.0.svn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20090908/cc7fe534/attachment-0001.html 

More information about the IPython-dev mailing list