Skip to content

Conversation

AdwaithBatchu
Copy link

PR summary

closes #22571

This PR implements a method to plot a 3D arrow.

The ax.arrow3d method plots a single arrow between specified end, start points. It returns an instance of the Arrow3D class, which inherits from the FancyArrowPatch class. Additional kwargs are passed on to FancyArrowPatch to change properties of the arrow.

PR checklist

Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this! I would love to see a version of this in the library, but my strong preference is for the signature to match FancyArrowPatch.

"""
3D FancyArrowPatch object.
"""
def __init__(self, xs, ys, zs, *args, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def __init__(self, xs, ys, zs, *args, **kwargs):
def __init__(self, posA, posB, *args, **kwargs):

I think the signature should match the FancyArrowPatch signature unless you have a reason not to. I implemented a rudimentary version with this signature:
https://github.com/story645/team/blob/00c7374cefb216e51b8f8350a4b5512ec1068a99/paper/figcode/nontrivial.py#L54-L64

@timhoffm
Copy link
Member

timhoffm commented Sep 5, 2025

IMO the major challenge here is semantics, scope and API design and that will entail the same topics as #29826 (comment), which lead to stalling in that thread. After all, we should have a consistent story between 2d and 3d. - I suspect to move forward here, we have to pick up the discussion from #29826.

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

Successfully merging this pull request may close these issues.

[ENH]: FancyArrow in 3D
3 participants