I want to add matplotlib draggable into streamlit.
I saw an old post trying to implement it in 2021, back then it wasn’t possible.
example code that I would like to replicate in a streamlit app:
import PySide6
import matplotlib.pyplot as plt
%matplotlib qt
#sample data and plot
x = [1, 2, 3, 4, 5]
y = [1, 4, 9, 16, 25]
plt.plot(x, y)
for i in range(len(x)):
ann = plt.annotate(f'({x[i]}, {y[i]})', xy=(x[i], y[i]), xytext=(x[i], y[i]+5), textcoords='data', arrowprops=dict(arrowstyle='->'))
ann.draggable()
legend.set_draggable(True)
Any idea if this is possible now?
Would love to implement this in my app
If there is an easy way to do this in plotly, that would also be super useful - but i could not find a straight forward way