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 by Abitamim · Pull Request #24697 · matplotlib/matplotlib

Conversation

@Abitamim

@Abitamim Abitamim commented Dec 12, 2022

Copy link
Copy Markdown
Contributor

PR Summary

Hello, this is my first contribution to an open-source project. This PR is to address the concerns raised in #24618. I've added the ability to specify fhead in the boxstyle attributes. By specifying "fhead=True" 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.

Also, in the documentation, I do not know how to update the graphic, since it is a static image.

PR Checklist

Documentation and Tests

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

Release Notes

  • [Unsure] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [Unsure] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [Unsure] 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
github-actions[bot]
github-actions Bot reviewed Dec 12, 2022
View reviewed changes

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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 while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. 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.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Abitamim
Add road-sign-annotation option
b8592f9
@Abitamim
Abitamim force-pushed the road-sign-annotation branch from 5c74e93 to b8592f9 Compare December 12, 2022 01:30
@oscargus

oscargus commented Dec 12, 2022

Copy link
Copy Markdown
Member

Thank you for this!

I think that there needs to be a bit of discussion if this is the way to go or not. The suggestion from @anntzer was to enable modifying all aspects of the arrow, where this was a special case. I can see that as a quite good option if we start modifying the arrow styles, although your approach clearly solves my use case.

Regarding documentation, the image is generated from "all" default styles during building. Hence, I think what should be done is to add a "What's new note" highlighting the new option. In addition, a test is required. I would simply add all three new styles in a single test image.

However, you may want to wait a bit with this until it is decided what the preferred way forward is.

Finally, one may want to modify the custom annotation demo on https://matplotlib.org/devdocs/tutorials/text/annotations.html to show some other shape, as the one in the example can now be obtained without a custom shape. (This should probably be done independent of solution, but not sure what a suitable alternative shape is...)

All reactions

Sorry, something went wrong.

Uh oh!

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

@oscargus oscargus added status: needs tests status: needs comment/discussion needs consensus on next step topic: annotation labels Dec 12, 2022
@Abitamim

Abitamim commented Dec 12, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

Thank you for this!

I think that there needs to be a bit of discussion if this is the way to go or not. The suggestion from @anntzer was to enable modifying all aspects of the arrow, where this was a special case. I can see that as a quite good option if we start modifying the arrow styles, although your approach clearly solves my use case.

Regarding documentation, the image is generated from "all" default styles during building. Hence, I think what should be done is to add a "What's new note" highlighting the new option. In addition, a test is required. I would simply add all three new styles in a single test image.

However, you may want to wait a bit with this until it is decided what the preferred way forward is.

Finally, one may want to modify the custom annotation demo on https://matplotlib.org/devdocs/tutorials/text/annotations.html to show some other shape, as the one in the example can now be obtained without a custom shape. (This should probably be done independent of solution, but not sure what a suitable alternative shape is...)

I made a change to the table in the tutorial section above the image. Should I not have done that -i.e. would that have also been generated automatically?

Also, where do I add a test?

I will work on a different version of this where the width of the arrowhead is adjustable as a percentage of the width of the body, and the length of the arrowhead is also adjustable by specifying an angle. Is this a better approach? And if so, how should I create a separate pull request for that?

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
@melissawm

melissawm commented Jun 15, 2023

Copy link
Copy Markdown
Member

Hello @Abitamim - I'm sorry this fell through the cracks. Are you interested in picking this back up?

For this PR, you probably want to add a test here: https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/tests/test_patches.py

For the tutorial, I believe that is the right change.

Let us know if you have other questions and if you need help with the rebase that needs to be done here, check our documentation on rebasing on main. Cheers!

All reactions

Sorry, something went wrong.

Uh oh!

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

@Abitamim

Abitamim commented Jun 16, 2023 via email

Copy link
Copy Markdown
Contributor Author
I’m interested in picking it back u0
…
________________________________ From: Melissa Weber Mendonça ***@***.***> Sent: Thursday, June 15, 2023 12:49:54 PM To: matplotlib/matplotlib ***@***.***> Cc: Abitamim Bharmal ***@***.***>; Mention ***@***.***> Subject: Re: [matplotlib/matplotlib] Addresses issue #24618 "Road sign" boxstyle/annotation (PR #24697) Hello @Abitamim<https://github.com/Abitamim> - I'm sorry this fell through the cracks. Are you interested in picking this back up? For this PR, you probably want to add a test here: https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/tests/test_patches.py For the tutorial, I believe that is the right change. Let us know if you have other questions and if you need help with the rebase that needs to be done here, check our documentation on rebasing on main<https://matplotlib.org/devdocs/devel/development_workflow.html#rebasing-on-upstream-main>. Cheers! — Reply to this email directly, view it on GitHub<#24697 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADDBKOPKVCSM2TSDO4ZOOM3XLNROFANCNFSM6AAAAAAS3KWB6E>. You are receiving this because you were mentioned.Message ID: ***@***.***>
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
@tacaswell

tacaswell commented Mar 13, 2024

Copy link
Copy Markdown
Member

Closing in favor of #24744

All reactions

Sorry, something went wrong.

Uh oh!

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

@tacaswell tacaswell closed this Mar 13, 2024
@melissawm melissawm moved this from Waiting for author to Done in First Time Contributors Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@github-actions github-actions[bot] github-actions[bot] left review comments

Uh oh!

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

Assignees

No one assigned

Labels

status: needs comment/discussion needs consensus on next step status: needs rebase status: needs tests topic: annotation

Projects

First Time Contributors
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

4 participants

@Abitamim @oscargus @melissawm @tacaswell
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 01402520 — 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.