IPython terminal issues with matplotlib 3.0 on macOS

Hello,

I just upgraded to matplotlib 3.0 and I'm noticing an annoying issue
using matplotlib in the IPython terminal. When I import
matplotlib.pyplot the terminal looses focus and some spurious escape
sequences appear in the terminal (last line below):

$ python.app -m IPython
Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:07:29)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.0.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import matplotlib.pyplot as plt

^[[47;1RIn [2]:

I guess this is due to matplotlib probing the different backends, but I
don't know where to look for the exact cause of this.

Cheers,
Dan

The spurious escape sequence is an IPython bug for sure. We don't know
exactly how to fix it.
The loosing focus might also be, we're not sure where this came from, it
appear only when using the Python.app launcher. Maybe some changes in the
gui integration.

···

--
Matthias

On Wed, 10 Oct 2018 at 18:40, Daniele Nicolodi <daniele at grinta.net> wrote:

Hello,

I just upgraded to matplotlib 3.0 and I'm noticing an annoying issue
using matplotlib in the IPython terminal. When I import
matplotlib.pyplot the terminal looses focus and some spurious escape
sequences appear in the terminal (last line below):

$ python.app -m IPython
Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:07:29)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.0.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import matplotlib.pyplot as plt

^[[47;1RIn [2]:

I guess this is due to matplotlib probing the different backends, but I
don't know where to look for the exact cause of this.

Cheers,
Dan
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20181010/b1dadcb0/attachment.html&gt;

Changes on the mpl side or on the jupyter side?

We also have matplotlib 3 pyplot on MacOS bounces rocket icon in dock · Issue #12188 · matplotlib/matplotlib · GitHub which is
due to mpl not handling the OSX backend discovery correctly in all cases.

Tom

···

On Wed, Oct 10, 2018 at 9:42 PM Matthias Bussonnier < bussonniermatthias at gmail.com> wrote:

The spurious escape sequence is an IPython bug for sure. We don't know
exactly how to fix it.
The loosing focus might also be, we're not sure where this came from, it
appear only when using the Python.app launcher. Maybe some changes in the
gui integration.

--
Matthias

On Wed, 10 Oct 2018 at 18:40, Daniele Nicolodi <daniele at grinta.net> wrote:

Hello,

I just upgraded to matplotlib 3.0 and I'm noticing an annoying issue
using matplotlib in the IPython terminal. When I import
matplotlib.pyplot the terminal looses focus and some spurious escape
sequences appear in the terminal (last line below):

$ python.app -m IPython
Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:07:29)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.0.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import matplotlib.pyplot as plt

^[[47;1RIn [2]:

I guess this is due to matplotlib probing the different backends, but I
don't know where to look for the exact cause of this.

Cheers,
Dan
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20181010/a4ed18b9/attachment.html&gt;

The spurious escape sequence is an IPython bug for sure. We don't know
exactly how to fix it.

The problem was not there with the older matplotlib, I find it hard to
to blame IPython for it, there must be something that triggers it when
matplotlib.pyplot is imported.

The loosing focus might also be, we're not sure where this came from, it
appear only when using the Python.app launcher. Maybe some changes in
the gui integration.

:frowning: It is very annoying.

Cheers,
Dan

···

On 10-10-2018 19:42, Matthias Bussonnier wrote:

Daniele,

Can you try with 3.0.1 and report if it is better?

Tom

···

On Wed, Oct 10, 2018 at 9:53 PM Daniele Nicolodi <daniele at grinta.net> wrote:

On 10-10-2018 19:42, Matthias Bussonnier wrote:
> The spurious escape sequence is an IPython bug for sure. We don't know
> exactly how to fix it.

The problem was not there with the older matplotlib, I find it hard to
to blame IPython for it, there must be something that triggers it when
matplotlib.pyplot is imported.

> The loosing focus might also be, we're not sure where this came from, it
> appear only when using the Python.app launcher. Maybe some changes in
> the gui integration.

:frowning: It is very annoying.

Cheers,
Dan
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

--
Thomas Caswell
tcaswell at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20181028/2ddb3a71/attachment.html&gt;