[BUG]: `vertical_spacing` argument for `make_subplots` should leave space for subplot titles
@SharadhNaidu ya está trabajando en esto.
Desde el 10/6/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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()
- Lenguaje dominante
- Python
- Estrellas
- 18.8k
- Forks
- 2.8k
- Merge medio
- 16 h 26 min
- PR fusionados (30 d)
- 21
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de plotly/plotly.py
-
P3 size: 1 task
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
bug P1
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
-
feature P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
feature P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Todos los issues de plotly/plotly.py
Issues similares
-
bug ci good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
documentation
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
inmanta/inmanta-core#10835 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
sponsored
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100