FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix use of --pylab=auto and --matplotlib=auto by ianthomas23 · Pull Request #14403 · ipython/ipython · GitHub

Repository navigation

Fix use of --pylab=auto and --matplotlib=auto - #14403

Merged
Carreau merged 1 commit into
ipython:mainfrom
ianthomas23:14401_pylab_auto
Apr 15, 2024
Merged

Carreau merged 1 commit into
ipython:mainfrom
ianthomas23:14401_pylab_auto

Conversation

Copy link
Copy Markdown
Collaborator

Fixes #14401 which has been a bug in the 8.22.x and 8.23.x releases.

When I removed the multiple initialisation of Matplotlib backends in #14330 it broke use of the following:

ipython --matplotlib
ipython --matplotlib=auto
ipython --pylab
ipython --pylab=auto

by failing to display Matplotlib plot. If you specify a particular GUI event loop such as using

ipython --pylab=qt

then it was and is fine. So for anyone finding this, the workaround until the next release is to specify a GUI loop rather than relying on the auto selection.

I didn't notice this as I've been concentrating on moving the Matplotlib backend logic from IPython to Matplotlib, and with those changes (matplotlib/matplotlib#27948) the above use cases all work OK.

The fix is to reintroduce the early import of matplotlib-inline but only if both the gui loop is not specified and the Matplotlib version is before the movement of the backend logic across to it.

There are no explicit tests for this. In the future I will try to think of some tests for some of this IPython-Matplotlib functionality that don't involve installing complicated backend dependencies or adding image comparison tests.

Carreau added this to the 8.24 milestone Apr 15, 2024

Carreau commented Apr 15, 2024

Copy link
Copy Markdown
Member

Thanks,

I'm marking for next release (in two weeks), if we have more complaints I can backport and make patches releases.

Carreau merged commit 3b57430 into ipython:main Apr 15, 2024
ianthomas23 deleted the 14401_pylab_auto branch October 3, 2024 15:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

matplotlib plots not showing when using "ipython --pylab"

2 participants


Back | FazBrowse Home | New Git URL