-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Addresses issue #24618 "Road sign" boxstyle/annotation #24697
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
Conversation
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.
5c74e93
to
b8592f9
Compare
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? |
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! |
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: ***@***.***>
|
Closing in favor of #24744 |
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
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst