GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Addresses issue #24618 "Road sign" boxstyle/annotation, alternative to #24697 by Abitamim · Pull Request #24744 · matplotlib/matplotlib

Conversation

@Abitamim

@Abitamim Abitamim commented Dec 16, 2022

Copy link
Copy Markdown
Contributor

PR Summary

This PR is to address the concerns raised in #24618. I've added the ability to specify "arrow_head" and "arrow_width" in the boxstyle attributes. By specifying "head_width=1" for DArrow, LArrow, or RArrow, this makes the head of the arrow flush with the top and bottom of the body.

I need advise on if this was the correct approach, or if I should try something else.

I have also added a test and documentation. I will likely have to redo all of these commit because git is messy, but I would like feedback on what I have done.

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Abitamim added 5 commits December 15, 2022 23:07
@Abitamim
Make arrow annotation arrowhead adjustable
e1241a3
@Abitamim
Add test - not sure if correct
792c229
@Abitamim
Update tutorial
0e890ec
@Abitamim
Merge branch 'main' of https://github.com/matplotlib/matplotlib into …
ed8396a
…adjustable-arrow-head-annotation
@Abitamim
Fixed linting
94907fe
@oscargus

oscargus commented Dec 16, 2022

Copy link
Copy Markdown
Member

Thank you!

Some minor comments to consider. (Hard to say which one we will go with in the end, so for what it is worth.)

I think that incorrect input should raise a ValueError rather than adjusting to be within the bounds. Not sure that having an upper limit of 10 for head_width actually makes sense. Imaging doing a very big plot etc.

It would be nice if one can modify the position of where the arrow part starts, now it can be quite crammed (but apart from that looks nice!). As I understand it, it is not possible at the moment? I seem to recall that there is a very nice illustration of the (fancy?) arrow properties somewhere that @timhoffm did. Maybe he would be kind enough to point it out? (I should have linked that in the issue I realize.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@oscargus oscargus added New feature topic: annotation labels Dec 16, 2022
@oscargus oscargus added this to the v3.8.0 milestone Dec 16, 2022
@timhoffm

timhoffm commented Dec 17, 2022

Copy link
Copy Markdown
Member

@oscargus do you mean the arrow in quiver? This does not help with BoxStyle.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the status: needs rebase label Feb 24, 2023
@story645

story645 commented Jun 15, 2023

Copy link
Copy Markdown
Member

@oscargus what do you think is left to do on this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ksunden ksunden mentioned this pull request Jul 21, 2023
add road sign #26360
Closed
5 tasks
@ksunden ksunden modified the milestones: v3.8.0, v3.9.0 Aug 8, 2023
tacaswell
tacaswell reviewed Mar 13, 2024
View reviewed changes
Comment thread lib/matplotlib/patches.py
greater than this is contrained to the edge values.
"""
self.pad = pad
if head_width > 10:

@tacaswell tacaswell Mar 13, 2024

Copy link
Copy Markdown
Member

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.

This can be done as self.head_width = np.clip(head_width, 0, 10)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tacaswell

tacaswell commented Mar 13, 2024

Copy link
Copy Markdown
Member

We like this one better than #24618 and do mostly like the parameterization (fraction of height + angle is less ambigious than two fractional lengths) but have a couple of to-dos / concerns

  • should "width" be "height" as it is a fraction of the height
  • do we need the limits on the length and angle (going greater than 180 could make >< shapes as well)
  • needs a whats new to show this off

[notes from call with @ksunden and @QuLogic ]

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tacaswell tacaswell modified the milestones: v3.9.0, v3.10.0 Mar 13, 2024
@tacaswell tacaswell mentioned this pull request Mar 13, 2024
Addresses issue #24618 "Road sign" boxstyle/annotation #24697
Closed
1 task done
@ksunden ksunden modified the milestones: v3.10.0, future releases Oct 9, 2024
@CharlieThornton33 CharlieThornton33 mentioned this pull request May 1, 2025
Implement head resizing (and reversal) for larrow/rarrow/darrow #29998
Closed
4 of 5 tasks
@anntzer anntzer mentioned this pull request Feb 25, 2026
Allow tuning the shape of {L,R,D}Arrow tips. #31198
Merged
5 tasks
@timhoffm

timhoffm commented Mar 26, 2026

Copy link
Copy Markdown
Member

Superseeded by #31198. @Abitamim thanks for your input, even though this specific PR is superseeded.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@timhoffm timhoffm closed this Mar 26, 2026
@github-project-automation github-project-automation Bot moved this from Waiting for author to Done in First Time Contributors Mar 26, 2026
@QuLogic QuLogic added the status: superseded label Mar 26, 2026
@QuLogic QuLogic modified the milestones: future releases, v3.11.0 Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tacaswell tacaswell tacaswell left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

New feature status: needs rebase status: superseded topic: annotation

Projects

First Time Contributors
Status: Done

Milestone

v3.11.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@Abitamim @oscargus @timhoffm @story645 @tacaswell @QuLogic @ksunden
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.