You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't force anncoords to fig coords upon dragging.
Minimal example:
from matplotlib import pyplot as plt
plt.annotate("foo", (.5, .5),
(15, 15), textcoords="offset points",
arrowprops={"arrowstyle": "->"},
bbox={"ec": "k"}).draggable()
plt.show()
Panning the axes shows that the annotation uses offset coordinates: it moves
"with" the point it points to. However, (before this patch is applied,) after
dragging the annotation somewhere else, it switches to figure coordinates: when
panning the axes, the text box stops physically moving; instead it's the arrow
that moves to follow the point.
The fix actually makes the code simpler...
0 commit comments