matplotlib / matplotlib/matplotlib
[ENH]: expand connectionPatch coords to support all annotation coords
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 23.2k
- 分支
- 8.5k
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 66
描述
### Problem
ConnectionPatch is described as annotation w/o text in the tutorial and as a function for connecting two aribtrary points in its docs and it would be very helpful if those two points could be artists. Since annotation supports this, I'm doing a lot of
```python
arrow = ax.annotate("", (x1, y1), (x2, y2), xycoords=A1, textcoords=A2, arrowprops=dict(arrowstyle='-|>'))
label = ax.annotate("label", (xp, yp), xycoords=arrow)
```
and I'd really rather prefer to use the object with "connect thing" semantics for connecting things and the object with "label things" semantics for labeling.
### Proposed solution
@anntzer proposed factoring out the annotation coordinate system in https://github.com/matplotlib/matplotlib/issues/22223#issuecomment-1011957191 and that's the approach I'd advocate here -> pull out the coordinate logic into its own logic and then have ConnectionPatch call out to that function.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先閱讀 ConnectionPatch 和註解座標的處理方式,然後檢視 issue #22223 中提出的座標系分解方法。當 ConnectionPatch 支援此處描述的註解座標形式(包括藝術家座標),同時保留其連接語義時,這項工作就完成了。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- data-visualization
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100