Figure does not show without explicit plt.show()
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
調査の方向性
まず、%matplotlib widget を使った2つのノートブックセルを、レポートに記載されたより大きなCSVと繰り返し実行を含めて再現し、%matplotlib inline と比較します。ペイロードにはリポジトリのファイル名やテストの記載がありません。明示的な plt.show() の呼び出しなしにインタラクティブな図が確実に表示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Report
Under some circumstances when using ipympl the figure does not show up in the output area unless plt.show() is explicitly called.
At the moment the reproduction is a bit finicky. As a minimal example these cells, when executed once show a nice empty plot:
%matplotlib widget
from matplotlib import pyplot as plt
import pandas as pd
from io import StringIO
fig, axes = plt.subplots(figsize=(6, 5.5))
s = """1,2,3
1,2,3"""
csv = StringIO(s)
df = pd.read_csv(csv)
# with this it always works:
# plt.show()
When changing the line to read a more complex dataset df = pd.read_csv(file_with_1MB) the empty figure sometimes does not show up anymore. If I add an explicit plt.show() at the end the figure always appears as normal.
It is not directly tied to the larger data file though, even the example above sometimes shows the same behavior after the second cell is re-executed several times. When using %matplotlib inline no issues or errors occur.
I am somewhat certain that this behavior is a regression, as it was not occurring in earlier versions of the Jupyterlab/ipympl ecosystem (with Jupyterlab/ipympl older than approximately six months ago).
Any hints how to debug this a bit better would be appreciated.
Versions
This issues occurs with a recent jupyterlab / ipympl installation (and using Chrome 142.0.7444.60). Here, this is on Windows 11 but the issue also occurs on Linux systems.
3.13.9 | packaged by conda-forge | (main, Oct 22 2025, 23:12:41) [MSC v.1944 64 bit (AMD64)]
ipympl version: 0.9.8
Selected Jupyter core packages...
IPython : 9.7.0
ipykernel : 7.1.0
ipywidgets : 8.1.8
jupyter_client : 8.6.3
jupyter_core : 5.9.1
jupyter_server : 2.17.0
jupyterlab : 4.4.10
nbclient : 0.10.2
nbconvert : 7.16.6
nbformat : 5.10.4
notebook : 7.4.4
qtconsole : not installed
traitlets : 5.14.3
C:\tools\miniconda3\Library\envs\jupyter\share\jupyter\labextensions
jupyter-matplotlib v0.11.8 enabled ok
jupyterlab_pygments v0.3.0 enabled ok (python, jupyterlab_pygments)
@jupyter-notebook/lab-extension v7.4.7 enabled ok
@jupyter-widgets/jupyterlab-manager v5.0.15 enabled ok (python, jupyterlab_widgets)
@mbektas/notebook-intelligence v1.1.2 enabled ok (python, notebook_intelligence)
- 主要言語
- Jupyter Notebook
- スター
- 1.7k
- フォーク
- 234
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
matplotlib/ipympl のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
matplotlib/ipympl#623 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
matplotlib/ipympl#622 · コメント 13 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
matplotlib/ipympl#612 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
matplotlib/ipympl#611 · コメント 4 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
matplotlib/ipympl#602 · コメント 1 件 ·
matplotlib/ipympl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
usability
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
inmanta/web-console#7367 ·
-
Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenNSW/nsw-srilanka#497 ·
-
react-doctor severity:warning tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
digidem/comapeo-cloud-app#401 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100