plotly / plotly/plotly.py

"x unified" Does not show all data info at same X

Offen
#3,606 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

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

Beschreibung

Environment:

Python 3.9.5
plotly.py v5.6.0
VS Code Jupyter Environment

How it is now

fig = px.scatter(result_df, x=[1, 2, 2, 3], y=[1, 2, 3, 4])
fig.update_traces(mode="markers", hovertemplate=None)
fig.update_layout(hovermode="x unified")
fig.show()
image As shown above, the hover box only displayed 1 y-axis value.

How it should be

image

The hover box should display all y-axis values at the same X, even if they are the same type, in my example scatter plot.
As demonstrated in the document, plotly has the capability to show all values at the same X. But unfortunately it only works when there are another data dimension involved.

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

Beginne mit der minimalen Python-Reproduktion unter Verwendung von px.scatter, update_traces und hovermode="x unified", und vergleiche anschließend ihr Verhalten mit der verknüpften Dokumentation zum Hover-Text. Untersuche, warum wiederholte Punkte mit demselben X nur einen Y-Wert in der Hover-Box erzeugen. Als erledigt gilt die Aufgabe, wenn die Hover-Box für den Beispielfall jeden Y-Achsenwert bei diesem X anzeigt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
jupyter-notebook, python
Bereich
data-visualization
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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