Skip to content

DOC: avoid czt example aspect warning - #25569

Merged
j-bowhay merged 2 commits into
scipy:mainfrom
AMBRA7592:doc-czt-arc-example-25532-v2
Jul 23, 2026
Merged

j-bowhay merged 2 commits into
scipy:mainfrom
AMBRA7592:doc-czt-arc-example-25532-v2

Conversation

@AMBRA7592

@AMBRA7592 AMBRA7592 commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Reference issue

Closes gh-25532.

What does this implement/fix?

This updates the scipy.signal.czt docstring example so the plot no longer triggers Matplotlib's fixed-limit/equal-aspect message during docs builds.

The example now draws the upper unit-circle reference with matplotlib.patches.Arc, creates the axes explicitly with fig, ax = plt.subplots(), and uses an equal aspect ratio with only the x limits fixed.

Additional information

Validation run locally:

  • git diff --check
  • python3 -m py_compile scipy/signal/_czt.py
  • Ran the updated plotting snippet with the Agg backend and confirmed it completes without emitting the previous Matplotlib message while retaining the original plot limits.

AI Generation Disclosure

OpenAI Codex was used to help prepare this PR, including the modified scipy.signal.czt docstring example and the PR description. I reviewed the final diff and validation results before submitting.

@github-actions github-actions Bot added scipy.signal Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org labels Jul 4, 2026
@AMBRA7592

Copy link
Copy Markdown
Contributor Author

Following up on this small documentation-only fix after two weeks. The rendered-docs, docs-build, refguide, SciPy-build, and benchmark checks are green, and the branch is conflict-free. Is the change still useful, or is there anything I should adjust to help review? Thanks.

@AMBRA7592

Copy link
Copy Markdown
Contributor Author

Yes, I see it: the reference arc was drawn on the lower semicircle while the sampled CZT points lie on the upper semicircle. That also expanded the automatic y-range and changed the focused semicircle plot into a square full-circle composition. I corrected the Arc to theta1=0, theta2=180 in 639bd23. A local Agg render now retains the original x/y limits and emits no warnings. Thanks for catching this.

@j-bowhay j-bowhay added this to the 1.19.0 milestone Jul 23, 2026
@j-bowhay
j-bowhay merged commit 0e544cb into scipy:main Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org scipy.signal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: Line printed by matplotlib when building the docs.

3 participants