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

Paul Hobson pmhobson@gmail....
Wed Jan 23 11:09:23 CST 2013


Ditch your startup files and just start the notebook with "ipython notebook
--pylab=inline"

Does that work?


On Wed, Jan 23, 2013 at 4:40 AM, Francesco Montesano <
franz.bergesund@gmail.com> wrote:

>
>
>
> 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
>>>
>>
>>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130123/eaac153f/attachment-0001.html 


More information about the IPython-User mailing list