Title: Configuring automatic use of tight_layout by pwuertz · Pull Request #1136 · matplotlib/matplotlib · GitHub
Open Graph Title: Configuring automatic use of tight_layout by pwuertz · Pull Request #1136 · matplotlib/matplotlib
X Title: Configuring automatic use of tight_layout by pwuertz · Pull Request #1136 · matplotlib/matplotlib
Description: This PR extends the introduction of the automatic use of tight_layout (#774) A user currently cannot make use of the automatic layout for creating figures without padding. Use-cases for border-less figures are graphical user interfaces and embedding of figures in documents. The first commit in the PR fixes that by adding the necessary keywords to the newly introduced tight_layout kwarg in figure. UPDATE (the following commits have been removed from the PR): The second commit fixes a usability glitch when manually calling tight_layout. Tight_layout grabs a renderer from the active backend for determining the font metrics. Most probably this is the default renderer from an interactive backend like GtkAgg or QtAgg. If the user now chooses to save figure using the svg backend this causes inconsistent results. Instead of calculating the metrics for the target backend, matplotlib creates a layout based on whichever backend that was previously set. Tight_layout should not be used as a standalone function and the patch makes a call to the old methods enable the automatic use of tight_layout for the given figure. The third commit updates the baseline images for test_tightlayout since the layouts in the test results slightly differ from the previous references.
Open Graph Description: This PR extends the introduction of the automatic use of tight_layout (#774) A user currently cannot make use of the automatic layout for creating figures without padding. Use-cases for border-less...
X Description: This PR extends the introduction of the automatic use of tight_layout (#774) A user currently cannot make use of the automatic layout for creating figures without padding. Use-cases for border-less...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/1136
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4e1ef091-ff9b-efa4-ca37-831c3b2c0d8d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B41C:2ECA08:1F2167E:2A49081:6A540AB8 |
| html-safe-nonce | 9f6b9cf492d05430580052d92c3666b8ca1bd2ebabb26975387ffacd1e382578 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDFDOjJFQ0EwODoxRjIxNjdFOjJBNDkwODE6NkE1NDBBQjgiLCJ2aXNpdG9yX2lkIjoiMzQxOTc5MjQ4MDU3NjczNTkyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6e0c7fa1b64e10f0252f842dc95fd0b1afb8f156eff340cb8eb857dadd45dc2d |
| hovercard-subject-tag | pull_request:2123839 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/1136/files |
| twitter:image | https://avatars.githubusercontent.com/u/1819283?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1819283?s=400&v=4 |
| og:image:alt | This PR extends the introduction of the automatic use of tight_layout (#774) A user currently cannot make use of the automatic layout for creating figures without padding. Use-cases for border-less... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width