plotly / plotly/plotly.py

fig.update_layout(xaxis_type="category") breaks make_subplots(shared_xaxes=True)

Offen
#4,838 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

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

Beschreibung

This one is pretty simple to explain and see. Create a subplot with two or more plots that are using the same x-axis data, enable shared_xaxes=True, plot it, and it works as intended; zooming in on one plot zooms in on both plots.

When updating the layout to xaxis_type="category", for categorical data, even when both both subplots have the same x-axis data and shared_xaxes=True is set to true, it no longer works; the axis are no longer shared. Zooming in on one plot no longer effects the other plot.

Tested on: plotly 5.24.1, python 3.13

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 damit, den gemeldeten Subplot-Fall mit make_subplots(shared_xaxes=True), kategorialen x-Achsen-Daten und xaxis_type="category" zu reproduzieren. Vergleiche das Zoomverhalten vor und nach der Layout-Aktualisierung; abgeschlossen ist die Aufgabe, wenn das Zoomen eines Subplots auch den anderen zoomt, wenn die x-Achse gemeinsam genutzt wird.

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
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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