-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Addresses issue #24618 "Road sign" boxstyle/annotation, alternative to #24697 #24744
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?
Addresses issue #24618 "Road sign" boxstyle/annotation, alternative to #24697 #24744
Conversation
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.) |
@oscargus what do you think is left to do on this PR? |
""" | ||
self.pad = pad | ||
if head_width > 10: |
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)
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
|
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
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