`plt.ioff()` not preventing automatic figure generation in jupyter
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the example using plt.ioff() or plt.interactive(False) in both Jupyter Lab and the classic notebook, then compare it with explicitly running %matplotlib inline. Trace the inline backend behavior around automatic figure display; done means figures are not displayed automatically without requiring the magic command.
Written by the indexing model from the issue text.
Description
Using plt.interactive(False) or plt.ioff() in Jupyter (Lab and classic notebook) does not seem to prevent automatic figure generation, unless the magic %matplotlib inline in run first, even though the inline backend is the default.
Example
import matplotlib.pyplot as plt
plt.ioff()
fig, ax = plt.subplots()
a = 0
The figure still appears automatically under the cell.

Note that
Explicitly running %matplotlib inline blocks figure creation (even though inline is the default activated backend in Jupyter):

Originally posted in https://github.com/matplotlib/matplotlib/issues/23766
- Dominant language
- Jupyter Notebook
- Stars
- 31
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ipython/matplotlib-inline
-
Support animations Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
ipython/matplotlib-inline#61 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ipython/matplotlib-inline#59 ·
-
Publish changelog Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ipython/matplotlib-inline#57 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ipython/matplotlib-inline#54 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
ipython/matplotlib-inline#44 · 1 comment ·
All issues in ipython/matplotlib-inline
Similar issues
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
growthbook/growthbook#7100 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
punkpeye/mcp-remote#369 ·
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Azure/azure-sdk-for-net#63292 · 3 comments · 1 reaction ·
-
bug p:3-mid pydanty:bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pydantic/pydantic-ai#8643 · 1 comment ·