matplotlib / matplotlib/ipympl

ipympl 0.8.2 - ginput() does not work on Jupyterlab / returns an empty array

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

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

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

説明

Describe the bug
I should be able to select data points from a figure and then red crosses are supposed to appear after clicking with the mouse, but nothing happens, an empty array is returned and the figures only appear after the timeout of ginput().

Expected behavior
Figure pops up and I can click with the mouse on the figure to select data points. An array will be generated

To Reproduce

%matplotlib widget 

import matplotlib.pyplot as plt
import numpy as np
t = np.arange(10)
   
plt.plot(t, np.sin(t))
     
plt.title('matplotlib.pyplot.ginput()\
 function Example', fontweight ="bold")
   
print("After 3 clicks :")
x = plt.ginput(3)
print(x)
   
plt.show()

My Platform

Firefox on Arch Linux, latest version after system update.
I tested it on Jupyterlab, I did not test it on Jupyter-notebook.

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

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

はじめの一歩

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

調査の方向性

まず、Firefox 上の JupyterLab で %matplotlib widget バックエンドを使用して issue の最小再現を実行します。plt.ginput(3) が空の配列を返し、タイムアウト後にのみ Figure が表示される理由を調査します。マウスクリックによって期待される座標と赤い十字マーカーが生成されれば完了です。

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

評価

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

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

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