Title: [Bug]: 3D ax1's tick labels and ax2's title overlap in a constrained layout · Issue #31277 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: 3D ax1's tick labels and ax2's title overlap in a constrained layout · Issue #31277 · matplotlib/matplotlib
X Title: [Bug]: 3D ax1's tick labels and ax2's title overlap in a constrained layout · Issue #31277 · matplotlib/matplotlib
Description: Bug summary I create a figure with a constrained layout and add a 3D-subplot at the top and a 2D-subplot at the bottom, but the tick labels of the 3D-subplot overlap with the title of the 2D-subplot. Code for reproduction import matplotl...
Open Graph Description: Bug summary I create a figure with a constrained layout and add a 3D-subplot at the top and a 2D-subplot at the bottom, but the tick labels of the 3D-subplot overlap with the title of the 2D-subplo...
X Description: Bug summary I create a figure with a constrained layout and add a 3D-subplot at the top and a 2D-subplot at the bottom, but the tick labels of the 3D-subplot overlap with the title of the 2D-subplo...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31277
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: 3D ax1's tick labels and ax2's title overlap in a constrained layout","articleBody":"### Bug summary\n\nI create a figure with a constrained layout and add a 3D-subplot at the top and a 2D-subplot at the bottom, but the tick labels of the 3D-subplot overlap with the title of the 2D-subplot.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\n\nfig = plt.figure(constrained_layout=True)\nax1 = fig.add_subplot(2, 1, 1, projection='3d')\nax1.set_title('3D Plot')\nax2 = fig.add_subplot(2, 1, 2)\nax2.set_title('2D Plot')\n\nplt.show()\n```\n\n### Actual outcome\n\n\u003cimg width=\"651\" height=\"491\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/35cb3dec-d2f5-4955-84f8-5898974b9d9f\" /\u003e\n\n### Expected outcome\n\n\u003cimg width=\"558\" height=\"514\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c2812e7c-4780-4e14-9fac-3a453b628621\" /\u003e\n\n### Additional information\n\n_No response_\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.10.8\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nNone","author":{"url":"https://github.com/williamlus","@type":"Person","name":"williamlus"},"datePublished":"2026-03-11T07:46:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/31277/matplotlib/issues/31277"}
| 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:16a4b299-5d82-70d0-76b5-d8695ccb614a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 88CC:3E8172:226EB8:322C7E:6A577A9B |
| html-safe-nonce | e00c969c78798ada21189a063cb2fb2b10d0b3b7b89372806342d004a67943dd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OENDOjNFODE3MjoyMjZFQjg6MzIyQzdFOjZBNTc3QTlCIiwidmlzaXRvcl9pZCI6IjE4NTcxMTIwNjQ5MzE2MjU2MjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4108410fd95923d0ec79d6efdf21713f2ca0ae96c0ab2857142057f317eaa86b |
| hovercard-subject-tag | issue:4056514352 |
| 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/31277/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7c205f273fc029aa25e1a9b3c863193543c49017e909659abb9abb419e7ae155/matplotlib/matplotlib/issues/31277 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7c205f273fc029aa25e1a9b3c863193543c49017e909659abb9abb419e7ae155/matplotlib/matplotlib/issues/31277 |
| og:image:alt | Bug summary I create a figure with a constrained layout and add a 3D-subplot at the top and a 2D-subplot at the bottom, but the tick labels of the 3D-subplot overlap with the title of the 2D-subplo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | williamlus |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6353e56e94423c9cd5abde7708a859afa36a0c1203c73749055bf6ee6704cd0 |
| 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 | 9a9dfe2eff5c790a030f34cfcc89b4bf3ba08c7c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width