Skip to content

[ENH]: expand connectionPatch coords to support all annotation coords #26440

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

Open
story645 opened this issue Aug 2, 2023 · 0 comments
Open

Comments

@story645
Copy link
Member

story645 commented Aug 2, 2023

Problem

ConnectionPatch is described as annotation w/o text in the tutorial and as a function for connecting two aribtrary points in its docs and it would be very helpful if those two points could be artists. Since annotation supports this, I'm doing a lot of

arrow = ax.annotate("", (x1, y1), (x2, y2), xycoords=A1, textcoords=A2, arrowprops=dict(arrowstyle='-|>'))
label = ax.annotate("label", (xp, yp), xycoords=arrow)

and I'd really rather prefer to use the object with "connect thing" semantics for connecting things and the object with "label things" semantics for labeling.

Proposed solution

@anntzer proposed factoring out the annotation coordinate system in #22223 (comment) and that's the approach I'd advocate here -> pull out the coordinate logic into its own logic and then have ConnectionPatch call out to that function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant