Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: ensure that the bounding box is scaled with dpi in example #26265

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
Jul 5, 2023

Conversation

tacaswell
Copy link
Member

closes #26264

The three changes are:

  • convert the tightbox to inches (via dpi_scale_trans)
  • set the padding added in FancyBboxPatch to 0
  • set the transform on fancy to be fig.dpi_scale_trans so at draw time it goes back to the correct pixels

@tacaswell tacaswell added this to the v3.8.0 milestone Jul 5, 2023
@tacaswell
Copy link
Member Author

@jklymak jklymak merged commit abb2059 into matplotlib:main Jul 5, 2023
@jklymak
Copy link
Member

jklymak commented Jul 5, 2023

Thanks for fixing this. There should be a straightforward way to do this, but this dance seems fine, particularly as this code is not very public.

@tacaswell tacaswell deleted the doc/fix_tight_bbox_example branch July 5, 2023 22:28
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.

[Doc]: Incorrectly drawn bounding box
2 participants