How do you show multiple plots in threads concurrently?
还没有人认领这个 Issue。
- 主要语言
- Rust
- 星标
- 1.5k
- 派生
- 128
- PR 合并指标
- 30 天内没有已合并 PR
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
该 issue 提到了 Plot、plot.show()、Traces 和 plot_configs,但没有指出文件或测试。首先定位这些入口点,并使用所描述的线程 workaround 重现并发创建和显示 plot;完整的解决方案需要一种已确定且可测试的方式,以处理跨线程和多种配置的 plot。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- data-visualization
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100