Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[ENH]: Add fancyarrow() as a function to draw single arrows #29826

Closed
@timhoffm

Description

@timhoffm

Problem

Drawing arrows is currently a mess.

  1. We haveax.arrow() which uses a fundamentally broken transformation, typically resulting in skewed arrows.
  2. There has been ample discussion on replacingarrow() with a more generalvector() methodVector #22435
  3. We have the recommendation toax.annotate() with an empty text.

I feel (3.) is quite complicated if you just want to draw an arrow between two points. I therefore suggest to add a methodax.fancyarrow() to replace (3.). It's basically a wrapper for creating a FancyArrowPatch

def fancyarrow(self, ...):    patch = FancyArrowPatch(...)    self.add_patch(patch)    return patch

Rationale:

  • The FancyArrowPatch API is capable and clear.
  • a wrapper function is justified since user code typically does not explicitly create and add Artists
  • The scope is reasonably different from what is discussed forvector() so that it does not overlap with a potential introduction ofvector() later
  • the namefancyarrow is a bit ... fancy, but we cannot usearrow and since this returns a FancyArrowPatch,fancyarrow seems the best viable name.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp