matplotlib / matplotlib/matplotlib
[ENH]: Add multiple span selector
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 23.2k
- 分支
- 8.5k
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 66
描述
### Problem
`matplotlib.widgets.SpanSelector` is a useful widget, however only supports one span to be created because of how the class functionality tracks movement and positioning on a screen.
### Proposed solution
Would there be interest in an `NSpanSelector`, which would generalize SpanSelector to N many spans controlled by a single object?
I've written a demo for `NSpanSelector` which is subclass of `SpanSelector`, that corrects the handling functionality for multiple spans. I haven't contributed to many open source projects before. I'm not sure if something like this would even be wanted by others - I had a particular use case where two selectors were needed simultaneously. But since I've written it I'm happy to contribute it!
Here's a snapshot of my example implementation.

貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先檢視 matplotlib.widgets.SpanSelector,以及 issue 中描述的 NSpanSelector 示範提案。在實作之前,釐清是否需要多 span API、其互動模型,以及哪些測試或範例可以定義完成標準。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- matplotlib, python
- 領域
- data-visualization
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100