Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Description
Problem
Drawing arrows is currently a mess.
- We have
ax.arrow()
which uses a fundamentally broken transformation, typically resulting in skewed arrows. - There has been ample discussion on replacing
arrow()
with a more generalvector()
methodVector #22435 - We have the recommendation to
ax.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 for
vector()
so that it does not overlap with a potential introduction ofvector()
later - the name
fancyarrow
is a bit ... fancy, but we cannot usearrow
and since this returns a FancyArrowPatch,fancyarrow
seems the best viable name.