Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draggable annotations specified in offset coordinates switch to figure coordinates after dragging #6783

Closed
anntzer opened this issue Jul 17, 2016 · 1 comment
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Jul 17, 2016

mpl 2.0b2

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, 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.
(Try it yourself to see what I mean :-))

Edit: The culprits are here and here. Probably not too hard to fix; however can we just internally normalize anncoords to always be a pair? Perhaps related to the possible switch to traitlets (how's that going)?

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jul 22, 2016
@anntzer
Copy link
Contributor Author

anntzer commented Sep 2, 2016

Closed by #6892.

@anntzer anntzer closed this as completed Sep 2, 2016
@QuLogic QuLogic modified the milestones: 2.0 (style change major release), 2.1 (next point release) Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants