Skip to content

FIX: Fix text wrapping - #28401

Merged
timhoffm merged 1 commit into
matplotlib:mainfrom
timhoffm:fix-wrap
Jun 19, 2024
Merged

timhoffm merged 1 commit into
matplotlib:mainfrom
timhoffm:fix-wrap

Conversation

@timhoffm

Copy link
Copy Markdown
Member

_get_dist_to_box() assumed that the figure box (x0, y0) coordinates are 0, which was correct at the time of writing, but does not hold anymore since the introduction of subfigures.

Closes #28378
Closes #28358

Note that the modified test fails with the original _get_dist_to_box() implementation.

Comment thread lib/matplotlib/tests/test_text.py Resolved
@rcomer rcomer added this to the v3.9.1 milestone Jun 18, 2024
`_get_dist_to_box()` assumed that the figure box (x0, y0) coordinates
are 0, which was correct at the time of writing, but does not hold
anymore since the introduction of subfigures.

Closes matplotlib#28378
Closes matplotlib#28358
@timhoffm

Copy link
Copy Markdown
Member Author

CI failures seem unrelated.

@timhoffm
timhoffm merged commit c9bda41 into matplotlib:main Jun 19, 2024
@timhoffm
timhoffm deleted the fix-wrap branch June 19, 2024 09:57
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jun 19, 2024
rcomer added a commit that referenced this pull request Jun 19, 2024
…401-on-v3.9.x

Backport PR #28401 on branch v3.9.x (FIX: Fix text wrapping)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH]: Switch text wrapping boundary to subfigure [Bug]: Labels don't get wrapped when set_yticks() is used in subplots

3 participants