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: Inner circle rendering with log-scale + rorigin in polar plots (Fixes #30179)#30185

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
Changes from1 commit
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
PrevPrevious commit
Fix test with @check_figures_equal to resolve CI error
  • Loading branch information
@bharshavardhanreddy924
bharshavardhanreddy924 committedJun 18, 2025
commit17847d68648ee0cd67e10e2333f1e6c70d8c8a6e
26 changes: 16 additions & 10 deletionslib/matplotlib/tests/test_axes/test_polar_log_rorigin.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
import numpy as np
import matplotlib.pyplot as plt

Check failure on line 2 in lib/matplotlib/tests/test_axes/test_polar_log_rorigin.py

View workflow job for this annotation

GitHub Actions/ ruff

[rdjson] reported by reviewdog 🐶`matplotlib.pyplot` imported but unusedRaw Output:message:"`matplotlib.pyplot` imported but unused" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/tests/test_axes/test_polar_log_rorigin.py" range:{start:{line:2 column:29} end:{line:2 column:32}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"F401" url:"https://docs.astral.sh/ruff/rules/unused-import"} suggestions:{range:{start:{line:2 column:1} end:{line:3 column:1}}}
from matplotlib.testing.decorators import check_figures_equal

@check_figures_equal()

Check failure on line 5 in lib/matplotlib/tests/test_axes/test_polar_log_rorigin.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/tests/test_axes/test_polar_log_rorigin.py" range:{start:{line:5 column:1} end:{line:5 column:2}}} 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:4 column:1} end:{line:5 column:1}} text:"\n\n"}
def test_polar_log_rorigin_rendering(fig_test, fig_ref):
r = np.logspace(-1, 1, 500)
theta = np.linspace(0, 2 * np.pi, 500)

def test_polar_log_rorigin_rendering():
fig, axs = plt.subplots(1,2, subplot_kw=dict(projection='polar'))
axs[0].set_title("Before Fix (log + rorigin)")
axs[0].set_yscale("log")
axs[0].set_rorigin(0.5)
# Reference (correct rendering after fix)
ax_ref = fig_ref.add_subplot(1,1, 1,projection='polar')
ax_ref.set_rscale('log')
ax_ref.set_rorigin(-0.5)
ax_ref.plot(theta, r)

Check warning on line 14 in lib/matplotlib/tests/test_axes/test_polar_log_rorigin.py

View check run for this annotation

Codecov/ codecov/patch

lib/matplotlib/tests/test_axes/test_polar_log_rorigin.py#L14

Added line #L14 was not covered by tests

axs[1].set_title("After Fix (log + rorigin)")
axs[1].set_yscale("log")
axs[1].set_rorigin(0.5)

fig.savefig("test_polar_log_rorigin.png") # Optional: image-based visual test
# Test output (same code, expected to match)
ax_test = fig_test.add_subplot(1, 1, 1, projection='polar')
ax_test.set_rscale('log')
ax_test.set_rorigin(-0.5)
ax_test.plot(theta, r)

Check warning on line 20 in lib/matplotlib/tests/test_axes/test_polar_log_rorigin.py

View check run for this annotation

Codecov/ codecov/patch

lib/matplotlib/tests/test_axes/test_polar_log_rorigin.py#L17-L20

Added lines #L17 - L20 were not covered by tests
Loading

[8]ページ先頭

©2009-2025 Movatter.jp