`plt.ioff()` not preventing automatic figure generation in jupyter
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
调研方向
首先,在 Jupyter Lab 和经典 notebook 中分别使用 plt.ioff() 或 plt.interactive(False) 重现该示例,然后将其与显式运行 %matplotlib inline 进行比较。跟踪 inline 后端围绕自动显示图形的行为;当图形不会自动显示且不需要 magic 命令时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Jupyter Notebook
- 星标
- 31
- 派生
- 39
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ipython/matplotlib-inline 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 48/100
ipython/matplotlib-inline#61 ·
-
难度 3/5 1-2 天 新手友好度 35/100
ipython/matplotlib-inline#59 ·
-
难度 3/5 1-2 天 新手友好度 35/100
ipython/matplotlib-inline#57 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
ipython/matplotlib-inline#54 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 48/100
ipython/matplotlib-inline#44 · 1 条评论 ·
查看 ipython/matplotlib-inline 的全部 Issue
相似的 Issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 76/100
growthbook/growthbook#7100 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
punkpeye/mcp-remote#369 ·
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
难度 2/5 1-3 小时 新手友好度 76/100
Azure/azure-sdk-for-net#63292 · 3 条评论 · 1 个 reaction ·
-
bug p:3-mid pydanty:bug
难度 2/5 1-3 小时 新手友好度 88/100
pydantic/pydantic-ai#8643 · 1 条评论 ·