0

Is there any way to get ginput() to work to plot inline interactive plots in jupter lab/notebook?

For example; something like:

pts = plt.ginput(2, show_clicks=True)
for p in pts:
        plot_trajectory(ax, p[1], p[0], 0.1, 25000)
plt.show()

Would be used to let the user click two points on the plot that are then used as starting points for the trajectories plotted by another function. I've managed to get it working using the qt matplotlib magic but this cannot be integrated with inline plots and wigets. Is there any way to do this?

0 Answers0