-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix example for "Scale invariant angle label" #23027
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
Hi there, @kkoutris! Thanks for looking into this issue. It looks like you have a few linting issues being caught by |
I took the liberty of adding "Closes ..." to the original post. In that way the issue is automatically closed upon merge. |
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.
I think a different approach is needed to solve this issue.
I added a comment that might offer more insight here: #22392 (comment)
am1 = AngleAnnotation(center, p1[1], p2[1], ax=ax, size=75, | ||
textposition="inside", text=r"$\alpha$") | ||
am2 = AngleAnnotation(center, p2[1], p1[0], ax=ax, size=35, | ||
textposition="inside", text=r"$\beta$") | ||
am3 = AngleAnnotation(center, p1[0], p2[0], ax=ax, size=75, | ||
textposition="inside", text=r"$\gamma$") | ||
am4 = AngleAnnotation(center, p2[0], p1[1], ax=ax, size=35, | ||
textposition="inside", text=r"$\theta$") |
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.
textposition="inside"
is the default for the AngleAnnotation
class.
This can be found here:
text="", textposition="inside", text_kw=None, **kwargs): |
@@ -185,7 +185,7 @@ def update_text(self): | |||
r = s / 2 | |||
if self.textposition == "inside": | |||
r = s / np.interp(angle_span, [60, 90, 135, 180], | |||
[3.3, 3.5, 3.8, 4]) | |||
[10, 3.5, 11.4, 4]) |
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.
I'm not sure this is the right approach to fix the issue. This is moving the text, but the issue is really about the scaling of the angle markings.
Moved to draft until comments addressed. Thanks! |
Closing as this is not the right approach (see #23027 (review)). |
PR Summary
Fix the plot example so that the letters be inside the arcs.
Closes #22392
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).