[IPython-dev] Testing matplotlib on IPython trunk

Brian Granger ellisonbg.net at gmail.com
Tue Sep 8 17:51:59 EDT 2009


You also may need to do:

plt.interactive(True)

Cheers,

Brian

On Tue, Sep 8, 2009 at 12:45 PM, Gökhan Sever <gokhansever at gmail.com> wrote:

> Hello,
>
> 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     :
> Linux-2.6.29.6-217.2.3.fc11.i686.PAE-i686-with-fedora-11-Leonidas
> Python       : ('CPython', 'tags/r26', '66714')
> IPython      : 0.11.bzr.r1205
> NumPy       : 1.4.0.dev
> Matplotlib   : 1.0.svn
>
> ================================================================================
>
> --
> Gökhan
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20090908/47f2078c/attachment.html>


More information about the IPython-dev mailing list