plotly / plotly/plotly.py

Streamline xanchor and yanchor names for center/middle

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

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

feature P3
主要言語
Python
スター
18.8k
フォーク
2.8k
平均マージ
16時間 26分
マージ済み PR(30日)
21

説明

The 'xanchor' property is an enumeration that may be specified as:
- One of the following enumeration values:
['auto', 'left', 'center', 'right']

The 'yanchor' property is an enumeration that may be specified as:
- One of the following enumeration values:
['auto', 'top', 'middle', 'bottom']

This is for plotly 6.3.0 trying to use fig.add_annotations() but it likely applies everywhere where xanchor and yanchor are used.

It does make sense that for the extremes of the bounding box left right top bottom, the names are different, but why is 'center' used for x direction and 'middle' for y direction? This distinction seems artifical to me and I wonder why this was chosen?

I propose to streamline the naming conventions, but now for backwards compatibility to at least accept both center/middle for x/yanchor.

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

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

はじめの一歩

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

調査の方向性

エントリポイント fig.add_annotations() から始めて、xanchoryanchor の値がどのように検証されているかを確認してください。同じ検証が他の場所でも共有されているかを確認し、その後、関連するテストを確認してください。完了条件には、適切な場合に centermiddle の両方を後方互換で受け入れ、既存の値が引き続き機能することを含めてください。

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

評価

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

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

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