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

Francesco Montesano franz.bergesund@gmail....
Wed Jan 23 06:40:14 CST 2013


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

>
>
>
> 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?
>>
>
bump: any idea about why this error is happening?

Francesco


> 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/20130123/28f68789/attachment.html 


More information about the IPython-User mailing list