Adding date in subplots is slow
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
Hi everyone!
I'm currently trying to create 50 subplots which will update each second like real time. I don't use dash because visualizing with Jupiter is more important for me.
Well, here is an example of a pseudocode
rows = 50
fig = go.FigureWidget(make_subplots(rows = rows, cols = 1, vertical_spacing = 0.005))
for i in range(1,rows+1):
fig.add_trace(go.Scatter(line_color = ...), row = i, col=1)
After, I update my subplots by signals. I decimated date and added in fig
with fig.batch_update():
for j in range(rows):
fig.data[j].x = trace['Date'][START:END]
fig.data[j].y = trace.iloc[START:END, col_st:col_end][str(col_end)]
And this procedure takes 3 seconds each loop, which is a very long time for my tasks. My question is how I can add more faster date.
If anyone wants to repeat the code, create date with size 100 and add to each subplots.
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
Das Issue enthält Pseudocode mit FigureWidget, make_subplots und batch_update, nennt jedoch keine Repository-Dateien oder Tests. Beginne damit, 50 Subplots mit Datumsarrays mit 100 Punkten zu reproduzieren und die Update-Schleife zu profilieren. Als erledigt gilt die Aufgabe erst, wenn eine bestätigte Leistungsverbesserung oder eine dokumentierte Erklärung des begrenzenden Pfads vorliegt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- jupyter-notebook, python
- Bereich
- data-visualization, performance
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100