Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Abitamim wants to merge5 commits intomatplotlib:main
base:main
Choose a base branch
Loading
fromAbitamim:adjustable-arrow-head-annotation

Conversation

Abitamim
Copy link

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 (andpytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild 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 indoc/users/next_whats_new/
  • API changes are marked with a.. versionchanged:: directive in the docstring and documented indoc/api/next_api_changes/
  • Release notes conform with instructions innext_whats_new/README.rst ornext_api_changes/README.rst

@oscargus
Copy link
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.)

@timhoffm
Copy link
Member

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

@story645
Copy link
Member

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

@ksundenksunden mentioned this pull requestJul 21, 2023
5 tasks
@ksundenksunden modified the milestones:v3.8.0,v3.9.0Aug 8, 2023
"""
self.pad = pad
if head_width > 10:
Copy link
Member

Choose a reason for hiding this comment

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

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

@tacaswell
Copy link
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 ]

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Projects
Status: Waiting for author
Milestone
future releases
Development

Successfully merging this pull request may close these issues.

6 participants
@Abitamim@oscargus@timhoffm@story645@tacaswell@ksunden

[8]ページ先頭

©2009-2025 Movatter.jp