10000 Shorten the definition of sawtooth boxstyle. by anntzer · Pull Request #24603 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Shorten the definition of sawtooth boxstyle. #24603

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
Dec 6, 2022
Merged

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Dec 3, 2022

Making each edge fit on a single line seems better to grasp the whole definition at once and justifies squeezing the definitions a bit.

PR Summary

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

@tacaswell tacaswell added this to the v3.7.0 milestone Dec 3, 2022
@anntzer anntzer marked this pull request as draft December 3, 2022 23:18
@anntzer anntzer marked this pull request as ready for review December 3, 2022 23:30
@anntzer
Copy link
Contributor Author
anntzer commented Dec 3, 2022

In fact the rewrite exposed a bug in the old definition of right_saw_x (which used dsx_n instead of dsy_n), which affects the case of fancyboxes around texts that are much taller than wide, e.g. figtext(.5, .5, r"$\frac{\frac{1}{2}}{\frac{3}{4}}$", bbox=dict(boxstyle="sawtooth", fc="none")) which previously rendered as
test
(note the missing sawtooths on the upper right).
This is now fixed by this PR too.

Making each edge fit on a single line seems better to grasp the whole
definition at once and justifies squeezing the definitions a bit.
@oscargus oscargus merged commit ab3d63d into matplotlib:main Dec 6, 2022
@anntzer anntzer deleted the st branch December 6, 2022 06:53
@oscargus oscargus mentioned this pull request Jul 16, 2023
5 tasks
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.

3 participants
0