[IPython-User] [Notebook] %pylab inline error

Francesco Montesano franz.bergesund@gmail....
Fri Jan 11 11:20:10 CST 2013


2013/1/11 Francesco Montesano <franz.bergesund@gmail.com>

> Dear list,
>
> I use notebook mostly for testing reasons. Furthermore, as I use mostly
> numpy and matplotlib, I have in ~/.ipython/profile_default/startup/ two
> files:
> 00-pylab.ipy, that calls %pylab (in my matplolibrc I set the backend to
> QtAgg)
> 01-interactive.py: call plt.ion()
>
> I have just discovered Pandas and I am documenting some of the tests that
> I have done, and I would like to have an inline plot in my notebook.
> From my understanding I should be able to toggle between backends using *%pylab
> inline *and *%pylab ... *.
> The cell where I do the plotting is:
>
> %pylab inline
> north.plot(x=0, y=1, linestyle='none', marker='.', label="cat north",
> color='b')
> south.plot(x=0, y=1, linestyle='none', marker='.', label="cat south",
> color='g')
> north.plot(x=0, y=1, linestyle='none', marker=',', label="mocks north",
> color='r')
> south.plot(x=0, y=1, linestyle='none', marker=',', label="mocks south",
> color='k')
> plt.legend()
>
>
> When I execute it, I get a long error ending in "RuntimeError: Cannot
> activate multiple GUI eventloops"
> Is this to be expected?
>
> I can anyway display the figure with dispay(plt.gcf()). Is this equivalent
> to have pylab inline?
>
I can answer myself: not really. If I call display it shows the figure in
the browser and in the external window

Fra

>
> Thanks in advance,
>
> Francesco
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130111/bb8f3e6f/attachment.html 


More information about the IPython-User mailing list