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

Fix polar aspect#30207

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

Closed

Conversation

mrinalcodez
Copy link

@mrinalcodezmrinalcodez commentedJun 23, 2025
edited
Loading

PR summary

This pull request addresses issue#30164 by refining the PolarAxes projection to fix autoscaling issues with radial ticks and improve aspect ratio handling and tick label visibility in polar plots. The update adds improved handling of axis aspect and radial tick formatting for more consistent and customizable polar plots.

A dedicated test script,test_polaraxes.py, has been added to verify the correctness and stability of these changes.

Below is an example image showcasing the improvements in polar plot appearance after applying this patch:

PolarAxes Aspect Ratio Improvement

PR checklist


Release notes

  • Added safeguard in get_matrix to prevent division by near-zero y-scale, avoiding potential rendering issues.
  • Overrode set_rticks in PolarAxes to correctly handle empty ticks and maintain the radius origin in view.
  • Fixed an autoscaling issue in polar plots in set_rticks function where the radial axis limits could shift the origin r=0 out of view after clearing or resetting ticks.
  • Added logic to clamp the radius axis minimum (or maximum if inverted) to the user intended origin, defaulting to zero if not explicitly set.
  • Prevents autoscaling from excluding the radial origin, ensuring correct rendering of polar axes.

@@ -169,6 +169,7 @@ class PolarAxes(Axes):
defget_rlabel_position(self)->float: ...
defset_rlabel_position(self,value:float)->None: ...
defset_rscale(self,*args,**kwargs)->None: ...
defset_yticks(self,*args,**kwargs)->None: ...
Copy link
Author

Choose a reason for hiding this comment

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

Sorry I did not follow the mypy syntax here for the python function it would be
def set_yticks(
self,
ticks: Sequence[float],
labels: Sequence[str] | None = ...,
*,
minor: bool = ...
) -> list[float]: ...

@timhoffm
Copy link
Member

Thanks for your willingness to contribute. As explained in#30194 (comment), there’s already an existing pull request. Per ourcontribution policy we do not accept concurrent pull request to an issue.

@github-project-automationgithub-project-automationbot moved this fromNeeds review toWaiting for author inFirst Time ContributorsJun 24, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
Status: Waiting for author
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[Bug]: Removing spines in polar plot causes distortion of the plot
2 participants
@mrinalcodez@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp