Title: [Bug]: calling fig.tight_layout multiple times · Issue #26290 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: calling fig.tight_layout multiple times · Issue #26290 · matplotlib/matplotlib
X Title: [Bug]: calling fig.tight_layout multiple times · Issue #26290 · matplotlib/matplotlib
Description: Bug summary Calling fig.tight_layout() multiple times warns. Code for reproduction import matplotlib.pyplot as plt fig = plt.figure() fig.tight_layout() fig.tight_layout() Actual outcome
Open Graph Description: Bug summary Calling fig.tight_layout() multiple times warns. Code for reproduction import matplotlib.pyplot as plt fig = plt.figure() fig.tight_layout() fig.tight_layout() Actual outcome X Description: Bug summary Calling fig.tight_layout() multiple times warns. Code for reproduction import matplotlib.pyplot as plt fig = plt.figure() fig.tight_layout() fig.tight_layout() Actual outcome <ipytho...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/26290
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: calling fig.tight_layout multiple times ","articleBody":"### Bug summary\n\nCalling `fig.tight_layout()` multiple times warns.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\n\r\nfig = plt.figure()\r\nfig.tight_layout()\r\nfig.tight_layout()\n```\n\n\n### Actual outcome\n\n```\r\n\u003cipython-input-9-0981ef8afcc1\u003e:5: UserWarning: The figure layout has changed to tight\r\n fig.tight_layout()\r\n```\n\n### Expected outcome\n\nno-warning.\n\n### Additional information\n\ndoes not show up in 3.7.1, does show up in 3.7.2. Have not bisected this yet (or checked main).\r\n\r\nFrom looking at the code I suspect \r\n6a82f38fe06bd40bc7dc2426dc8953a94a06e70d / https://github.com/matplotlib/matplotlib/pull/25626 / https://github.com/matplotlib/matplotlib/pull/25624 which is from me 😞 .\r\n\r\n\r\nxref https://github.com/matplotlib/matplotlib/pull/25624\r\n\r\nI suspect the fix is to not warn if we set the place holder due to `fig.tight_layout`.\r\n\n\n### Operating system\n\nArch\n\n### Matplotlib Version\n\n3.7.2\n\n### Matplotlib Backend\n\nany\n\n### Python version\n\n3.11\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/tacaswell","@type":"Person","name":"tacaswell"},"datePublished":"2023-07-12T00:18:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/26290/matplotlib/issues/26290"}
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:5b3e4899-70d6-2621-c2c8-fe6abd9810f6 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id 8AB4:288515:19A7425:2285852:6A535D55 html-safe-nonce daaaa70a6e3205ebd58f90dd87c1bab3d40c3e5e2d2d591a43d713e6773c4641 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUI0OjI4ODUxNToxOUE3NDI1OjIyODU4NTI6NkE1MzVENTUiLCJ2aXNpdG9yX2lkIjoiNDAwMjAzNjYxNjc5NzU3NjUzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac d0a5d01c8ae39413a2b9adf31e41a8a5ac5a1b3b8d184e83ee13bf947874732c hovercard-subject-tag issue:1799949794 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/26290/issue_layout twitter:image https://opengraph.githubassets.com/379dc79c19adae2689536aa5318e24e18b98357ae484d8aff5f3d9eb911ff9d4/matplotlib/matplotlib/issues/26290 twitter:card summary_large_image og:image https://opengraph.githubassets.com/379dc79c19adae2689536aa5318e24e18b98357ae484d8aff5f3d9eb911ff9d4/matplotlib/matplotlib/issues/26290 og:image:alt Bug summary Calling fig.tight_layout() multiple times warns. Code for reproduction import matplotlib.pyplot as plt fig = plt.figure() fig.tight_layout() fig.tight_layout() Actual outcome og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username tacaswell 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
URLs of crawlers that visited me.