Can't draw spike line across subplots with make_subplots in 4.0.0
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18.8k
- Forks
- 2.8k
- Ø Merge
- 16 Std. 26 Min.
- Gemergte PRs (30 T.)
- 21
Beschreibung
After upgrading to plotly 4.0.0, I can't see how to create a spike line across shared axes created with make_subplots.
Previously I was using code like this:
from plotly.tools import make_subplots
from plotly.io import write_html
fig = make_subplots(rows=4, cols=1, shared_xaxes=True)
x_vals = list(range(10))
y_vals = [x**2 for x in x_vals]
fig.add_scatter(x=x_vals, y=y_vals, row=1, col=1)
fig.add_scatter(x=x_vals, y=y_vals, row=2, col=1)
fig.add_scatter(x=x_vals, y=y_vals, row=3, col=1)
fig.add_scatter(x=x_vals, y=y_vals, row=4, col=1)
fig.update_xaxes(spikemode='across+marker')
write_html(fig, 'out.html', auto_open=True)
The resulting figure showed spike lines across axes because only one x axis was created:

But in 4.0, multiple x axes are created so the spike line no longer draws across all subplots:

Is there any way around this? Thanks!
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der bereitgestellten Python-Reproduktion unter Verwendung von make_subplots, shared_xaxes und fig.update_xaxes(spikemode='across+marker'). Vergleiche die erzeugte Konfiguration der Subplot-Achsen in Plotly 4.0 mit dem früheren Verhalten einer einzelnen Achse. Als abgeschlossen gilt die Identifizierung einer unterstützten Möglichkeit, die Spike-Linie über alle gemeinsam genutzten Subplots zu erstrecken, oder die Dokumentation dieser Einschränkung und ihrer Umgehung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100