Title: legend(bbox_transform) don't work with tight layout in 2.2.x · Issue #11041 · matplotlib/matplotlib · GitHub
Open Graph Title: legend(bbox_transform) don't work with tight layout in 2.2.x · Issue #11041 · matplotlib/matplotlib
X Title: legend(bbox_transform) don't work with tight layout in 2.2.x · Issue #11041 · matplotlib/matplotlib
Description: The following code worked as expected in matplotlib 2.1.x but doesn't work in matplotlib 2.2.x fig=plt.figure(1) fig.clf() ax=[fig.add_subplot(2,2,i+1) for i in range(4)] for j in range(3): for i in range(2): ax[j].plot([0,i]) ax[0].lege...
Open Graph Description: The following code worked as expected in matplotlib 2.1.x but doesn't work in matplotlib 2.2.x fig=plt.figure(1) fig.clf() ax=[fig.add_subplot(2,2,i+1) for i in range(4)] for j in range(3): for i i...
X Description: The following code worked as expected in matplotlib 2.1.x but doesn't work in matplotlib 2.2.x fig=plt.figure(1) fig.clf() ax=[fig.add_subplot(2,2,i+1) for i in range(4)] for j in range(3): for...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/11041
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"legend(bbox_transform) don't work with tight layout in 2.2.x","articleBody":"The following code worked as expected in matplotlib 2.1.x but doesn't work in matplotlib 2.2.x\r\n```python\r\nfig=plt.figure(1)\r\nfig.clf()\r\nax=[fig.add_subplot(2,2,i+1) for i in range(4)]\r\nfor j in range(3):\r\n for i in range(2):\r\n ax[j].plot([0,i])\r\nax[0].legend(['1','2'], \r\n bbox_to_anchor=(0.1, 1), \r\n bbox_transform=ax[-1].transAxes, loc=\"upper left\")\r\nax[-1].axis(\"off\")\r\nfig.set_tight_layout(True)\r\n```\r\nThe subplots are in the wrong place and have the wrong size (mostly outside the figure window in my real ploting code ...) and its get even worse if you interact with them.\r\n\r\npython 3.6\r\nmatplotlib 2.2.0 and 2.2.2 has been tested.\r\n \r\n\r\n","author":{"url":"https://github.com/fredrik-1","@type":"Person","name":"fredrik-1"},"datePublished":"2018-04-12T18:11:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/11041/matplotlib/issues/11041"}
| 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:50d10a9a-805e-1b2b-85f1-d3b0c51acc5e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C46A:185C34:1A47FE5:23E98AE:6A536C15 |
| html-safe-nonce | c4b8809c1e74e3538b0a7833dbdaae1c16ba948129b6726afc98bb197be62c5a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDZBOjE4NUMzNDoxQTQ3RkU1OjIzRTk4QUU6NkE1MzZDMTUiLCJ2aXNpdG9yX2lkIjoiODk3Mzg3MTY2MzIyMjU4MjI5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9a37edaaef865364362233785eb39eda833e15744aaa54a0212d858ad01d63a5 |
| hovercard-subject-tag | issue:313833279 |
| 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/11041/issue_layout |
| twitter:image | https://opengraph.githubassets.com/31c384e4efd506faed643852681bec005989bb58db846adfc69ea54acada781d/matplotlib/matplotlib/issues/11041 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/31c384e4efd506faed643852681bec005989bb58db846adfc69ea54acada781d/matplotlib/matplotlib/issues/11041 |
| og:image:alt | The following code worked as expected in matplotlib 2.1.x but doesn't work in matplotlib 2.2.x fig=plt.figure(1) fig.clf() ax=[fig.add_subplot(2,2,i+1) for i in range(4)] for j in range(3): for i i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fredrik-1 |
| 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