plotly / plotly/plotly.py

[Feature request] Make it easier to specify spacing in between titles and subtitles

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

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

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

説明

I really appreciate the subtitle parameter within Plotly Express charts. However, I'm finding that, when I use title_y to update the title's location, the subtitle's location doesn't follow accordingly. This can result in unsightly gaps between the title and subtitle.

Would it be possible to add a subtitle_y dimension that would let me adjust the spacing between title and subtitle elements? I suppose subtitle_x would be handy also in case some users want a horizontal offset between titles and subtitles.

Here are some screenshots for reference. First, in this chart, I'd like to move the title and subtitle up to increase the spacing between those elements and my legend:

Image

I can set title_y to 0.98 to move it farther from the legend; however, the y position of the subtitle moves up only a little, thus increasing the gap between the two.

Image

If there were a corresponding subtitle_y parameter that I could adjust, I would be able to easily resolve this issue. (In the meantime, I can get around it by creating subtitles via add_annotation.)

Thank you in advance for your consideration and help!

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

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

はじめの一歩

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

調査の方向性

Plotly Express のサブタイトルとタイトルの配置動作、特に title_y がサブタイトルに与える影響から始め、現在の add_annotation による回避策と比較します。サブタイトルの垂直方向および水平方向のオフセットを、不要な間隔なしにユーザーがそれぞれ独立して制御でき、動作が文書化され、適切なチェックでカバーされていれば完了です。

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

評価

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

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

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