plotly / plotly/plotly.py

[Feature request] Make it easier to specify spacing in between titles and subtitles

Abierto
#5,434 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
18.8k
Forks
2.8k
Merge medio
16 h 26 min
PR fusionados (30 d)
21

Descripción

I really appreciate the subtitle parameter within Plotly Express charts. However, I'm finding that, when I use title_y to update the title's location, the subtitle's location doesn't follow accordingly. This can result in unsightly gaps between the title and subtitle.

Would it be possible to add a subtitle_y dimension that would let me adjust the spacing between title and subtitle elements? I suppose subtitle_x would be handy also in case some users want a horizontal offset between titles and subtitles.

Here are some screenshots for reference. First, in this chart, I'd like to move the title and subtitle up to increase the spacing between those elements and my legend:

Image

I can set title_y to 0.98 to move it farther from the legend; however, the y position of the subtitle moves up only a little, thus increasing the gap between the two.

Image

If there were a corresponding subtitle_y parameter that I could adjust, I would be able to easily resolve this issue. (In the meantime, I can get around it by creating subtitles via add_annotation.)

Thank you in advance for your consideration and help!

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza por el comportamiento de Plotly Express en cuanto a la posición del subtítulo y el título, especialmente por cómo title_y afecta al subtítulo; compáralo con la solución alternativa actual basada en add_annotation. Se considera terminado cuando los usuarios puedan controlar de forma independiente los desplazamientos vertical y horizontal del subtítulo sin la separación no deseada, y cuando el comportamiento esté documentado y cubierto por comprobaciones adecuadas.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
data-visualization
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.