How do you show multiple plots in threads concurrently?
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 1.5k
- Fork
- 128
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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:
This is workaroundable if we create threads to both create the plot and show it, like this:
but then we can't return the plots made in those threads to our main thread:
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:
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
La issue nomina Plot, plot.show(), Traces e plot_configs, ma non indica file né test. Inizia individuando questi punti di ingresso e riproducendo la creazione e la visualizzazione concorrenti dei grafici con il workaround dei thread descritto; una soluzione completa richiederebbe un modo definito e verificabile per gestire i grafici tra thread e configurazioni multiple.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- data-visualization
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100