plotly / plotly/plotly.rs

How do you show multiple plots in threads concurrently?

Offen
#280 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Rust
Sterne
1.5k
Forks
128
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

TLDR: Ultimately, my question is, would it be possible to adapt the Plot type to be Send so we could more easily show multiple plots at once? (or is there another way to achieve that? should we serialize the plot?)

I love Plotly and use it a lot, one thing I noticed is plot.show() is blocking, and the natural way to show multiple plots at once would be to send them to threads, but something about the Traces prevents us from being able to show multiple plots at the same time:

Image

Image

This is workaroundable if we create threads to both create the plot and show it, like this:

Image

but then we can't return the plots made in those threads to our main thread:

Image

also, this approach might trip up if we want to create and show multiple different kinds of plots from multiple different kinds of plot_configs, although i guess we could use an enum like this:

Image

just curious how y'all handle this, right now I'm doing the workaround but thought it would be cool if we could just make a bunch of plots and send em around without issues

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

Das Issue nennt Plot, plot.show(), Traces und plot_configs, aber keine Dateien oder Tests. Beginne damit, diese Einstiegspunkte zu finden und die gleichzeitige Erstellung und Anzeige von Plots mit dem beschriebenen Thread-Workaround zu reproduzieren; eine vollständige Lösung würde eine festgelegte, testbare Methode zur Verarbeitung von Plots über Threads und mehrere Konfigurationen hinweg erfordern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
data-visualization
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

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