[IPython-dev] An issue using matplotlib in the new ipython
Eric Firing
efiring at hawaii.edu
Wed Aug 24 15:49:34 EDT 2011
On 08/24/2011 08:57 AM, Gökhan Sever wrote:
> Hi,
>
> Using the new IPython with --pylab option:
>
> Creating a simple plot via
>
> plt.plot(range(10))
>
> then typing in the shell for example:
>
> plt.plot? and getting the help blocks the figure. Is this a known
> issue? I don't recall seeing this behavior in the previous IPython.
It does result from the major change in how IPython handles the guis; it
is now relying on PyOS_InputHook and leaving everything in a single
thread instead of running the gui mainloop in a separate thread.
Getting help shells out to the pager ("less" on linux), so nothing gets
updated until that process is ended--the python process itself is
waiting for it rather than checking for text input. I imagine the only
ways to get around that without multi-threading would be if the external
pager were replaced with python code, or if "less" could be run in the
background. I suspect the latter would be difficult if not impossible,
since "less" would still need console IO.
The ipython qtconsole avoids this problem--but you have to have qt, of
course.
Eric
>
> matplotlib.__version__
> '1.1.0'
>
> using Qt4Agg also confirmed with WXAgg
>
> Also noting a minor typo at
>
> https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/axes.py
> line 4360:
>
> The loc "itslef" ->itself can be a 2-tuple giving x,y of the
> lower-left corner of
>
> Thanks
>
>
More information about the IPython-dev
mailing list