enable arbitrary formatting on x-axis and y-axis tick labels
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 18.8k
- 分支
- 2.8k
- 平均合併
- 16 小時 26 分鐘
- 30 天內合併 PR
- 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!
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從公開的入口 fig.update_layout 和 fig.update_xaxis 開始,接著追蹤 x 軸和 y 軸刻度標籤的表示方式。定義 formatter 的行為和 API,並考慮測試應如何驗證任意格式化,而不要求手動設定 tickvals 和 ticktext。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- plotly, python
- 領域
- data-visualization
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 活躍
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100