matplotlib / matplotlib/ipympl
Follow-up to #343 - Embedding Static Plots
まだ誰も着手していません。
- 主要言語
- Jupyter Notebook
- スター
- 1.7k
- フォーク
- 234
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
#343 was a huge step forward for saving the state of plots in notebooks. But it doesn't truly reproduce the state of the notebook that the author was looking at for these two cases:
- If widget state is saved then only a blank figure renders (https://github.com/matplotlib/ipympl/pull/343#issuecomment-920167467)
- Any updates to the figure after the initial render are not saved in the notebook (https://github.com/matplotlib/ipympl/pull/343#issuecomment-921008926)
I think part 2 is very important to be able to tell a story using a notebook. e.g. If I make some plots with a slider, get them just so and then run nbconvert I don't think I would faithfully reproduce the state of the notebook as I was looking at it.
Part 1 should be solvable if we include the PNG as part of the widget model
Part 2 I think a reasonable tradeoff would be to only update the static plot whenever the notebook is saved. This would require the frontend of ipywidgets (jupyterlab-manager, and widgetsnbextension) to listen to notebook save signals and pass them to the ipympl frontend, which would in turn let the backend know to update the mimebundle.
@martinRenou how hard do you think the second one (saving) would be to fix? To me that feels like a very important thing to hit.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、jupyterlab-manager と widgetsnbextension で notebook の保存シグナルがどのように処理されるかを読み、次に mimebundle を更新するための ipympl のフロントエンドからバックエンドへの経路を追跡します。PNG のケースにおける widget model の処理を確認します。保存された widget state が空の図ではなくレンダリングされ、レンダリング後の更新が notebook の保存時および nbconvert で保持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- jupyter, jupyter-notebook
- 領域
- backend, frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100