matplotlib / matplotlib/ipympl

MPL Event Handling Doc Example not fully functioning

オープン
#315 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Jupyter Notebook
スター
1.7k
フォーク
234
PR マージ指標
30日以内にマージされた PR はありません

説明

I tried the example from the MPL event handling docs: a [bar chart with draggable bars](https://matplotlib.org/stable/users/event_handling.html#draggable-rectangle-exercise) ("extra credit" version). This works fine in `QT5Agg` backend, but doesn't fully work in Jupyter Lab (v3.0.7) with ipympl (v0.7.0). The plot displays fine, and I can see that click and drag events are being received by the widget, but during drag, the bars vanish. In fact, if in the click handler I include a color change:

```python
self.rect.set(animated=True,color='red')
```

Then I can see a faint red outline after the bar is "dropped" in the correct location (see below). So clearly the click/drag/release events are working, but the bar drawing during and after drag via `draw_artist` and `blit` are not.

![image](https://user-images.githubusercontent.com/93749/113195477-51990380-9230-11eb-97c9-ef1defe2360f.png)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

JupyterLab 3.0.7 と ipympl 0.7.0 を使って、MPL のイベント処理ドキュメントにあるドラッグ可能な矩形の演習を再現し、その後 QT5Agg と比較します。ドラッグ中の draw_artist と blit の呼び出しを追跡します。Jupyter 環境でバーが表示されたままドラッグ可能であれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
jupyter, python
領域
frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。