Skip to content

FIX: use axis lines tight bbox within axis artist tight bbox#31628

Merged
QuLogic merged 1 commit into
matplotlib:mainfrom
rcomer:axisartist-tightbbox
May 8, 2026
Merged

FIX: use axis lines tight bbox within axis artist tight bbox#31628
QuLogic merged 1 commit into
matplotlib:mainfrom
rcomer:axisartist-tightbbox

Conversation

@rcomer

@rcomer rcomer commented May 7, 2026

Copy link
Copy Markdown
Member

PR summary

Fixes #31622. Since the axis lines appear to be clipped to the axes, we should use their tight bounding box instead of their window extent in their parent's tight bounding box. The code from the issue now gives

floating_axis_default floating_axis_tight floating_axis_constrained

I welcome any guidance on whether there is a better/simpler example to use for the test. I am not familiar with axis artists.

AI Disclosure

None

PR checklist

@rcomer rcomer added the PR: bugfix Pull requests that fix identified bugs label May 7, 2026

@timhoffm timhoffm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm also not an expert in axis artist, but the example looks simple enough.

@rcomer

rcomer commented May 8, 2026

Copy link
Copy Markdown
Member Author

Am I right in thinking bug fixes currently go in the 3.11 milestone?

@rcomer rcomer added this to the v3.11.0 milestone May 8, 2026
@timhoffm

timhoffm commented May 8, 2026

Copy link
Copy Markdown
Member

I would say so because we'll do another release candidate.

@QuLogic QuLogic merged commit 4f2f5ec into matplotlib:main May 8, 2026
44 of 46 checks passed
@rcomer rcomer deleted the axisartist-tightbbox branch May 8, 2026 19:46
QuLogic added a commit that referenced this pull request May 8, 2026
QuLogic added a commit that referenced this pull request May 8, 2026
…628-on-v3.11.x

Backport PR #31628 on branch v3.11.x (FIX: use axis lines tight bbox within axis artist tight bbox)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: bugfix Pull requests that fix identified bugs topic: mpl_toolkit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: tight and constrained layouts honouring invisible parts of floating_axis

3 participants