Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug: mathtext rendered width not being calculated correctly #25692

Merged
merged 4 commits into from Apr 15, 2023

Conversation

lganic
Copy link
Contributor

@lganic lganic commented Apr 15, 2023

PR Summary

Fixes #23810

The mathtext was being treated as normal text during the width calculations, added a check that allows for it to be automatically directed to the proper backend functions.

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

lib/matplotlib/text.py Outdated Show resolved Hide resolved
lganic and others added 2 commits April 15, 2023 04:53
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
@oscargus oscargus added this to the v3.8.0 milestone Apr 15, 2023
@oscargus
Copy link
Contributor

Thanks for your contribution and congratulation on your first merged PR! Hope to see you around!

@jklymak jklymak merged commit e31d8ed into matplotlib:main Apr 15, 2023
37 of 39 checks passed
@jklymak
Copy link
Member

jklymak commented Apr 15, 2023

ooops sorry - cross merge?

@oscargus
Copy link
Contributor

Seems to have worked out well! I got that my attempt failed so should be OK!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Text objects don't take Mathtext into account while wrapping.
4 participants