matplotlib / matplotlib/matplotlib

[ENH]: expand connectionPatch coords to support all annotation coords

オープン
#26,440 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

New feature topic: arrow
主要言語
Python
スター
23.2k
フォーク
8.5k
平均マージ
1日 6時間
マージ済み PR(30日)
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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず ConnectionPatch とアノテーションの座標処理を読み、その後、issue #22223 で提案されている座標系のファクタリング方針を確認してください。ConnectionPatch が、接続のセマンティクスを維持したまま、artist coordinates を含む、ここで説明されているアノテーション座標の形式をサポートすれば、作業は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
data-visualization
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。