Title: [Bug]: `inset_axes` colorbar + `tight_layout` raises `AttributeError` · Issue #22576 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: `inset_axes` colorbar + `tight_layout` raises `AttributeError` · Issue #22576 · matplotlib/matplotlib
X Title: [Bug]: `inset_axes` colorbar + `tight_layout` raises `AttributeError` · Issue #22576 · matplotlib/matplotlib
Description: Bug summary I think #21749 wasn't fully fixed. mpl_toolkits.axes_grid1.inset_locator.inset_axes still appears to be affected. This still throws in v3.5.1: Code for reproduction import matplotlib import matplotlib.pyplot as plt from mpl_t...
Open Graph Description: Bug summary I think #21749 wasn't fully fixed. mpl_toolkits.axes_grid1.inset_locator.inset_axes still appears to be affected. This still throws in v3.5.1: Code for reproduction import matplotlib im...
X Description: Bug summary I think #21749 wasn't fully fixed. mpl_toolkits.axes_grid1.inset_locator.inset_axes still appears to be affected. This still throws in v3.5.1: Code for reproduction import matplotli...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/22576
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: `inset_axes` colorbar + `tight_layout` raises `AttributeError`","articleBody":"### Bug summary\n\nI think #21749 wasn't fully fixed. `mpl_toolkits.axes_grid1.inset_locator.inset_axes` still appears to be affected. This still throws in v3.5.1:\r\n\n\n### Code for reproduction\n\n```python\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\nfrom mpl_toolkits.axes_grid1.inset_locator import inset_axes\r\n\r\n\r\nmatplotlib.__version__\r\n# \u003e '3.5.1'\r\n\r\nfig, ax = plt.subplots(1, 1)\r\npts = ax.scatter([0, 1], [0, 1], c=[1, 5])\r\n\r\ncax = inset_axes(ax, width=\"3%\", height=\"70%\")\r\nplt.colorbar(pts, cax=cax)\r\n\r\nplt.tight_layout()\n```\n\n\n### Actual outcome\n\n```py\r\nAttributeError: 'AnchoredSizeLocator' object has no attribute 'get_subplotspec'\r\n```\n\n### Expected outcome\n\nNo error\n\n### Additional information\n\n_No response_\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.5.1\n\n### Matplotlib Backend\n\nmodule://matplotlib_inline.backend_inline\n\n### Python version\n\n3.10.2\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/janosh","@type":"Person","name":"janosh"},"datePublished":"2022-03-01T12:29:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/22576/matplotlib/issues/22576"}
| 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:163ac65d-fa11-2401-f299-129d4fbdff0e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B26:1CAF22:6859AD:8B2BCD:6A52FEDA |
| html-safe-nonce | 703643f6cbae1ada535a634b640de5c665d5648c8ae6d2686d1e8e506cddfa24 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjI2OjFDQUYyMjo2ODU5QUQ6OEIyQkNEOjZBNTJGRURBIiwidmlzaXRvcl9pZCI6Ijc2NjkzMDY5Nzk0OTY2ODkzNzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3de1896281f5ba4199274fec5a31f659ed5980ada6b73b9581ffaaf73f8da003 |
| hovercard-subject-tag | issue:1155282660 |
| 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/22576/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a1ac81f04573f50f164752a2a4ca2556ae08f6d929216bf1300d40b5afadca2e/matplotlib/matplotlib/issues/22576 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a1ac81f04573f50f164752a2a4ca2556ae08f6d929216bf1300d40b5afadca2e/matplotlib/matplotlib/issues/22576 |
| og:image:alt | Bug summary I think #21749 wasn't fully fixed. mpl_toolkits.axes_grid1.inset_locator.inset_axes still appears to be affected. This still throws in v3.5.1: Code for reproduction import matplotlib im... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | janosh |
| 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