Title: [BUG]: `vertical_spacing` argument for `make_subplots` should leave space for subplot titles · Issue #5606 · plotly/plotly.py · GitHub
Open Graph Title: [BUG]: `vertical_spacing` argument for `make_subplots` should leave space for subplot titles · Issue #5606 · plotly/plotly.py
X Title: [BUG]: `vertical_spacing` argument for `make_subplots` should leave space for subplot titles · Issue #5606 · plotly/plotly.py
Description: Description Setting the vertical_spacing argument of make_subplots to a small value, while also passing subplot_titles, results in a really ugly chart where the subplot titles overlap the subplots themselves. Ideally vertical_spacing sho...
Open Graph Description: Description Setting the vertical_spacing argument of make_subplots to a small value, while also passing subplot_titles, results in a really ugly chart where the subplot titles overlap the subplots ...
X Description: Description Setting the vertical_spacing argument of make_subplots to a small value, while also passing subplot_titles, results in a really ugly chart where the subplot titles overlap the subplots ...
Opengraph URL: https://github.com/plotly/plotly.py/issues/5606
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG]: `vertical_spacing` argument for `make_subplots` should leave space for subplot titles","articleBody":"### Description\n\nSetting the `vertical_spacing` argument of `make_subplots` to a small value, while also passing `subplot_titles`, results in a really ugly chart where the subplot titles overlap the subplots themselves.\n\nIdeally `vertical_spacing` should take titles into account, and control the spacing _between the top of the title and the bottom of the subplot above_.\n\nWe obviously don't know the _exact_ size of the title text, but something like font size * 1.75 should be approximately the right amount of space for a single-line title.\n\nHowever we need to see whether this requires changes to Plotly.js, since `axis.domain` only supports units of plot fraction, not sure if there is a way to shift it by a certain number of pixels.\n \n### Screenshots/Video\n\n\u003cimg width=\"1740\" height=\"1272\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a6d45164-82eb-4b1c-891d-0dbbe38b79b4\" />\n\n### Steps to reproduce\n\n```python\nfrom plotly.subplots import make_subplots\nimport plotly.graph_objects as go\nimport random\n\nfig1 = make_subplots(\n rows=6, cols=1,\n shared_xaxes=True,\n vertical_spacing=0.02,\n row_heights=[0.35, 0.13, 0.13, 0.13, 0.13, 0.13],\n subplot_titles=['Heart Rate Variability', 'Walking', 'Cycling', 'Hiking', 'Other', 'Pilates']\n )\nfor i in range(6):\n fig1.add_trace(\n go.Scatter(x=[0,1,2], y=[random.randint(0, 10) for _ in range(3)]),\n row=i+1,\n col=1\n )\nfig1.show()\n```\n","author":{"url":"https://github.com/emilykl","@type":"Person","name":"emilykl"},"datePublished":"2026-06-01T21:40:42Z","url":"https://github.com/plotly/plotly.py/issues/5606"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:1041a091-bbae-400f-ecc7-34805ce83827 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DEEE:3F8AB1:3876DA2:47BCF1C:6B01DA87 |
| html-safe-nonce | 3abe2af5b285594aba28ddb241105a37e59fde3c0633a1109a891eb632d73b19 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUVFOjNGOEFCMTozODc2REEyOjQ3QkNGMUM6NkIwMURBODciLCJ2aXNpdG9yX2lkIjoiMzg5ODAxNTc4NTk1OTkzODY5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6a3fb85f310b784fc3569de8346f25cbf5510f005e87c6d5d3e28f8358baec2f |
| hovercard-subject-tag | issue:4566605701 |
| 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/plotly/plotly.py/5606/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9d285d505b361e5b3aa2b51fe614b2ad6e0cab4eb10140b2db5041f5ef0d2530/plotly/plotly.py/issues/5606 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9d285d505b361e5b3aa2b51fe614b2ad6e0cab4eb10140b2db5041f5ef0d2530/plotly/plotly.py/issues/5606 |
| og:image:alt | Description Setting the vertical_spacing argument of make_subplots to a small value, while also passing subplot_titles, results in a really ugly chart where the subplot titles overlap the subplots ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | emilykl |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.py git https://github.com/plotly/plotly.py.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 14579099 |
| octolytics-dimension-repository_nwo | plotly/plotly.py |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14579099 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.py |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width