plotly / plotly/plotly.py

enable arbitrary formatting on x-axis and y-axis tick labels

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

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

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

説明

Thanks for the awesome work on this project! It is incredibly useful!

I have a feature request. I work for a hedge fund and we want our plotly graphs to follow a standardized format. I am having a hard time through writing a generic formatting function that formats the x-axis and y-axis tick values.

For instance, if you wanted to set the tick axis to be bold and include a "x" at the end, you would need to do something like:

fig.update_layout(
    yaxis = dict(
        tickmode = 'array',
        tickvals = [1, 2, 3],
        ticktext = ["<b>1x</b>", "<b>2x</b>", "<b>3x</b>"]
    )
)

Which is pretty inconvenient because you have to specify the tickvals every time you want to do this.

So I was thinking that it could be a good idea to add something like:
fig.update_xaxis(tick_text_formatter=<function that formats a tick value>)

Thoughts?

Again, thanks for the awesome work!

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

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

はじめの一歩

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

調査の方向性

公開されているエントリーポイント fig.update_layout と fig.update_xaxis から始め、x 軸と y 軸の目盛りラベルがどのように表現されているかを追跡します。formatter の動作と API を定義し、手動で tickvals と ticktext を指定しなくても任意のフォーマットを検証できるよう、テストでどのように確認すべきかを検討します。

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

評価

技術スタック
plotly, python
領域
data-visualization
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

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

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