Skip to content

ENH: Add a fancy arrow patch handler to default legend handlers - #32713

Open
rossbar wants to merge 4 commits into
matplotlib:mainfrom
rossbar:gh-32711
Open

rossbar wants to merge 4 commits into
matplotlib:mainfrom
rossbar:gh-32711

Conversation

@rossbar

@rossbar rossbar commented Dec 3, 2026

Copy link
Copy Markdown

PR summary

Addresses #32708. I used #10688 as a starting point (with attribution), narrowing the scope to only address FancyArrowPatch. I've also added a very basic unit test - I'm happy to add more (i.e. check more properties) and/or add an image comparison test but I wanted to see what maintainers prefer first!

AI Disclosure

No AI in any capacity.

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • Plotting related features are demonstrated in an example
    • This is simply an "improvement" of existing functionality; however, if folks are interested
      in a gallery example I'd be happy to add one!
  • New features and API changes have release notes
  • Documentation complies with general and docstring guidelines

rossbar and others added 4 commits December 3, 2026 11:46
* Create HandlerFancyArrowPatch class derived from HandlerPatch
* Overload _creat_patch to extract arrowstyle info
* Add HandlerFancyArrowPatch to default legend handlers.

Co-authored-by: magedhennawy <magedhennawy@gmail.com>
Comment on lines +4 to +5
Legend handles for FancyArrowPatch instances will now reflect the arrowstyle of
the instance in the legend by default.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could this get a sample image?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH]: Add a HandlerFancyArrowPatch to the list of default legend_handlers

3 participants