Title: tight_layout() messes up bbox_to_anchor in legend(). · Issue #14432 · matplotlib/matplotlib · GitHub
Open Graph Title: tight_layout() messes up bbox_to_anchor in legend(). · Issue #14432 · matplotlib/matplotlib
X Title: tight_layout() messes up bbox_to_anchor in legend(). · Issue #14432 · matplotlib/matplotlib
Description: Bug report I want to plot something with the legend outside the figure. I am using legend(bbox_to_anchor=(1.2, 1)) To position the legend and then I have to do tight_layout() To make sure the plot is complete when saved to a file. Unfort...
Open Graph Description: Bug report I want to plot something with the legend outside the figure. I am using legend(bbox_to_anchor=(1.2, 1)) To position the legend and then I have to do tight_layout() To make sure the plot ...
X Description: Bug report I want to plot something with the legend outside the figure. I am using legend(bbox_to_anchor=(1.2, 1)) To position the legend and then I have to do tight_layout() To make sure the plot ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/14432
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tight_layout() messes up bbox_to_anchor in legend().","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\nI want to plot something with the legend outside the figure. I am using \r\n \r\n legend(bbox_to_anchor=(1.2, 1))\r\n\r\nTo position the legend and then I have to do \r\n\r\n tight_layout()\r\n\r\nTo make sure the plot is complete when saved to a file.\r\n\r\nUnfortunately, tight_layout() pushes the legend into the figure no matter what values I put in the legend function. \r\n\r\nIt would be nice to have more convenient ways to postion the legend beside or even above or below the figure.\r\n","author":{"url":"https://github.com/sorenwacker","@type":"Person","name":"sorenwacker"},"datePublished":"2019-06-03T18:56:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/14432/matplotlib/issues/14432"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:09746566-0a06-c734-2cba-0d87b9816ca0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD4C:19CFB6:837804:AE9612:6A52AC28 |
| html-safe-nonce | 594fbd2962ad9ee34e3b5ec6486da3bdfec81ee51cb4b4be4bad82089b650f08 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDRDOjE5Q0ZCNjo4Mzc4MDQ6QUU5NjEyOjZBNTJBQzI4IiwidmlzaXRvcl9pZCI6IjY4NzE2MzA2MDM3MTgxNDMwMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1ebd2b7740194c64fdbf759464024c0dd2d6b9867d3e06c57a45eb9e1c448bd8 |
| hovercard-subject-tag | issue:451636624 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/matplotlib/matplotlib/14432/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e0bb8e866cf6a47c997b7c00b3afe94e360bb685a3f55f019342157298868f5a/matplotlib/matplotlib/issues/14432 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e0bb8e866cf6a47c997b7c00b3afe94e360bb685a3f55f019342157298868f5a/matplotlib/matplotlib/issues/14432 |
| og:image:alt | Bug report I want to plot something with the legend outside the figure. I am using legend(bbox_to_anchor=(1.2, 1)) To position the legend and then I have to do tight_layout() To make sure the plot ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sorenwacker |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| 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