ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

Graphical Input (ginput) blocked by Ipywidgets 7.6.5

Open opens9999 opened this issue 3 years ago • 0 comments
trafficstars

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.

opens9999 avatar Nov 27 '21 22:11 opens9999