FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DOC: clarify GridSpec ratio updates by QianyeSu · Pull Request #32415 · matplotlib/matplotlib · GitHub

Repository navigation

DOC: clarify GridSpec ratio updates - #32415

Merged
timhoffm merged 1 commit into
matplotlib:mainfrom
QianyeSu:docs/clarify-gridspec-ratio-updates
Oct 4, 2026
Merged

timhoffm merged 1 commit into
matplotlib:mainfrom
QianyeSu:docs/clarify-gridspec-ratio-updates

Conversation

QianyeSu commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

PR summary

GridSpec.set_width_ratios and set_height_ratios update the ratios stored by a GridSpec, but existing Axes are not repositioned unless a layout engine runs or their SubplotSpec is re-evaluated. This behavior is currently implicit and can be surprising when a setter is called after Axes have been created.

This change documents that existing-Axes behavior in both setter docstrings and points users to the supported ways to apply the updated ratios.

Closes #31971

AI Disclosure

I used generative AI to help inspect the repository, identify the relevant issue, and proofread this description. I reviewed and verified the change and the test result myself.

PR quality check

  • Use an expressive title
  • New and changed code is tested (documentation-only change; existing GridSpec tests pass)
  • Plotting related features are demonstrated in an example (not applicable)
  • New features and API changes have release notes (not applicable; documentation clarification only)
  • Documentation complies with the contribution guidelines

Testing

  • ./.venv/bin/pytest -q lib/matplotlib/tests/test_gridspec.py (7 passed)
  • git diff --check

Copilot AI balanced review requested due to automatic review settings October 1, 2026 11:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

github-actions Bot added the topic: geometry manager LayoutEngine, Constrained layout, Tight layout label Oct 1, 2026
timhoffm added this to the v3.11.3 milestone Oct 4, 2026
timhoffm merged commit 3a143fc into matplotlib:main Oct 4, 2026
39 of 41 checks passed
timhoffm added a commit that referenced this pull request Oct 4, 2026
…415-on-v3.11.x

Backport PR #32415 on branch v3.11.x (DOC: clarify GridSpec ratio updates)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation topic: geometry manager LayoutEngine, Constrained layout, Tight layout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Changing GridSpec column/row ratios after axes creation does not update the figure layout

3 participants


Back | FazBrowse Home | New Git URL