10000 Warn if a non-str is passed to an rcParam requiring a str. by anntzer · Pull Request #20311 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Warn if a non-str is passed to an rcParam requiring a str. #20311

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

Merged
merged 1 commit into from
May 26, 2021

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented May 26, 2021

See changelog note for motivation.

Closes bug 1 of https://discourse.matplotlib.org/t/issue-rendering-a-latex-formula/21977/2

PR Summary

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@tacaswell tacaswell merged commit cc28615 into matplotlib:master May 26, 2021
@tacaswell
Copy link
Member

Thank you for cleaning up my obliquely reported bugs.

@anntzer anntzer deleted the rcs branch May 26, 2021 20:21
@anntzer
Copy link
Contributor Author
anntzer commented May 27, 2021

@tacaswell Do you want to writeup and open the other two bugs of the thread?
[I think the correct solution for the multiline issue is that Texts with usetex=True should just skip the linebreaking and send everything at once to texmanager; that seems to be easy enough to implement, the only thing I would suggest is checking that text alignments are correct at the end; as for the "too large" issue (equation numbers ending up way to the right), we could emit a warning if texmanager returns something that's wider than the canvas (I don't think we should do so for normal text or anything else because drawing things that go beyond the canvas and get clipped is something we normally support, but in the specific case of usetex things may just be too confusing for the end user otherwise, as they arise from an implementation detail (the large geometry values) of usetex).]

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.

3 participants
0