How do you show multiple plots in threads concurrently?

Aberta
#280 3 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
30/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
rust

Direção de pesquisa

A issue nomeia Plot, plot.show(), Traces e plot_configs, mas não indica arquivos nem testes. Comece localizando esses pontos de entrada e reproduzindo a criação e a exibição concorrentes de gráficos com o workaround de threads descrito; uma solução completa precisaria de uma forma definida e testável de lidar com gráficos entre threads e múltiplas configurações.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Rust
Estrelas
1.5k
Forks
128
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de plotly/plotly.rs

Todas as issues de plotly/plotly.rs

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.