plotly / plotly/plotly.py

[BUG]: Subplot LaTeX titles misaligned

Offen
#5,624 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug P2 size: 3
Vorherrschende Sprache
Python
Sterne
18.8k
Forks
2.8k
Ø Merge
16 Std. 26 Min.
Gemergte PRs (30 T.)
21

Beschreibung

Description

make_subplots produces plots with misaligned LaTeX titles:
Image

Nor do they seem to be properly centered.
Saving the image with fig.write_image(img.png) does not render it differently.

If you remove the letter "p" from the title on the right or add one on the left, that seems to "solve" the vertical alignment problem.

Steps to reproduce
from plotly.subplots import make_subplots

fig = make_subplots(rows=1, cols=2,
                    subplot_titles=(r'$\Large\text{Investment Rate}$',r"$\Large\text{Experts' Capital Share}$"))

fig.add_scatter(x=[], y=[], row=1, col=1)
fig.add_scatter(x=[], y=[], row=1, col=2)

fig.update_layout(#template="plotly_white+presentation", 
                  height=600, width=1200)
fig

Version: 6.8.0


I also think the default positioning of the title should be a tiny bit higher.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Führen Sie die bereitgestellte Python-Reproduktion mit plotly 6.8.0 aus, beginnend bei make_subplots und dem Pfad zur Positionierung der Subplot-Titel. Vergleichen Sie die interaktive Darstellung mit fig.write_image(img.png); abgeschlossen ist die Aufgabe, wenn die LaTeX-Titel vertikal ausgerichtet und zentriert sind und die Standardtitelposition etwas höher liegt, falls diese Anforderung enthalten ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
data-visualization
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.