matplotlib / matplotlib/ipympl
Excessive white space / margins with some plots.
まだ誰も着手していません。
- 主要言語
- Jupyter Notebook
- スター
- 1.7k
- フォーク
- 234
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
With the current ipympl 0.9.6 (and probably earlier versions) I am observing excessive white space around axes in some cases when using the %matplotlib ipympl mode but not in the %matplotlib inline mode.
A small example to reproduce:
%matplotlib ipympl
from matplotlib import pyplot as plt
fig, ax = plt.subplots(figsize=(5, 3), constrained_layout=True)
ax.imshow([[1,2,3],[4,5,6],[7,8,9]])
ax.set_aspect(0.1)
This yields:
And the same example in inline mode:
%matplotlib inline
from matplotlib import pyplot as plt
fig, ax = plt.subplots(figsize=(5, 3), constrained_layout=True)
ax.imshow([[1,2,3],[4,5,6],[7,8,9]])
ax.set_aspect(0.1)
Especially larger figures then became unmanageable in the ipympl backend. Setting constrained_layout or using plt.tight_layout() does not seem to influence the margins. Can this behavior be influenced?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、%matplotlib ipympl と %matplotlib inline を使用して、提供されている2つの例を実行します。constrained layout と aspect の設定も含めてください。結果の余白を比較し、ipympl の figure のレンダリングとレイアウトの動作を追跡します。ipympl の例で、より大きな figure を含め、axes の周囲に過剰な空白が生じなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- jupyter-notebook, python
- 領域
- data-visualization, frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100