-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Implement head resizing (and reversal) for larrow/rarrow/darrow #29998
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
base: main
Are you sure you want to change the base?
Implement head resizing (and reversal) for larrow/rarrow/darrow #29998
Conversation
… type hinting for LArrow/RArrow/DArrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
PR summary
When creating an annotation using boxed text in an arrow shape (
patches.BoxStyle.LArrow
/RArrow
/DArrow
),head_width
andhead_angle
arguments may now be passed to adjust the size of the arrow head(s), and (via the use of negative angles) generate 'reversed' arrow heads. Addresses #24618 and is a direct continuation of @Abitamim's work in #24744.This solves both the issue initially mentioned in #24618 (creating a pentagonal 'road-sign' annotation box), as well as allowing for many other customisation options for arrows; for example, a reversed-head
DArrow
could act as a way to bring attention to a certain region on an axis.A new test,
test_boxarrow_adjustment
, has been added to test these options.PR checklist