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 issue #30164: Removing spines in polar plot causing distortion of…#30194

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
Closed
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletionlib/matplotlib/projections/polar.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,9 +13,9 @@
import matplotlib.ticker as mticker
import matplotlib.transforms as mtransforms
from matplotlib.spines import Spine

from matplotlib.ticker import FixedLocator, AutoLocator

class PolarTransform(mtransforms.Transform):

Check failure on line 18 in lib/matplotlib/projections/polar.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶Expected 2 blank lines, found 1Raw Output:message:"Expected 2 blank lines, found 1" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/projections/polar.py" range:{start:{line:18 column:1} end:{line:18 column:6}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"E302" url:"https://docs.astral.sh/ruff/rules/blank-lines-top-level"} suggestions:{range:{start:{line:17 column:1} end:{line:18 column:1}} text:"\n\n"}

Check failure on line 18 in lib/matplotlib/projections/polar.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶Expected 2 blank lines, found 1Raw Output:message:"Expected 2 blank lines, found 1" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/projections/polar.py" range:{start:{line:18 column:1} end:{line:18 column:6}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"E302" url:"https://docs.astral.sh/ruff/rules/blank-lines-top-level"} suggestions:{range:{start:{line:17 column:1} end:{line:18 column:1}} text:"\n\n"}
r"""
The base polar transform.

Expand DownExpand Up@@ -818,6 +818,12 @@
self.yaxis = RadialAxis(self, clear=False)
self.spines['polar'].register_axis(self.yaxis)

# PATCH START
locator = self.xaxis.get_major_locator()
if isinstance(locator, FixedLocator) and len(locator.locs) == 0:
self.xaxis.set_major_locator(AutoLocator())
# PATCH END

def _set_lim_and_transforms(self):
# A view limit where the minimum radius can be locked if the user
# specifies an alternate origin.
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp