[BUG]: `vertical_spacing` argument for `make_subplots` should leave space for subplot titles
@SharadhNaidu がすでに取り組んでいます。
2026年6月10日 から。
評価
この issue はまだ評価されていません。
説明
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 should take titles into account, and control the spacing between the top of the title and the bottom of the subplot above.
We 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.
However 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.
Screenshots/Video
Steps to reproduce
from plotly.subplots import make_subplots
import plotly.graph_objects as go
import random
fig1 = make_subplots(
rows=6, cols=1,
shared_xaxes=True,
vertical_spacing=0.02,
row_heights=[0.35, 0.13, 0.13, 0.13, 0.13, 0.13],
subplot_titles=['Heart Rate Variability', 'Walking', 'Cycling', 'Hiking', 'Other', 'Pilates']
)
for i in range(6):
fig1.add_trace(
go.Scatter(x=[0,1,2], y=[random.randint(0, 10) for _ in range(3)]),
row=i+1,
col=1
)
fig1.show()
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/plotly.py のほかの issue
-
P3 size: 1 task
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug P1
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
feature P3
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
feature P3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
plotly/plotly.py の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main オープンarea: ci bug perceived difficulty: 3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ClickHouse/clickhouse-connect#1057 ·