plotly / plotly/plotly.py

[BUG]: Subplot LaTeX titles misaligned

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

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

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

説明

Description

make_subplots produces plots with misaligned LaTeX titles:
Image

Nor do they seem to be properly centered.
Saving the image with fig.write_image(img.png) does not render it differently.

If you remove the letter "p" from the title on the right or add one on the left, that seems to "solve" the vertical alignment problem.

Steps to reproduce
from plotly.subplots import make_subplots

fig = make_subplots(rows=1, cols=2,
                    subplot_titles=(r'$\Large\text{Investment Rate}$',r"$\Large\text{Experts' Capital Share}$"))

fig.add_scatter(x=[], y=[], row=1, col=1)
fig.add_scatter(x=[], y=[], row=1, col=2)

fig.update_layout(#template="plotly_white+presentation", 
                  height=600, width=1200)
fig

Version: 6.8.0


I also think the default positioning of the title should be a tiny bit higher.

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

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

はじめの一歩

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

調査の方向性

提供された Python の再現コードを plotly 6.8.0 で実行し、make_subplots からサブプロットタイトルの配置パスをたどってください。インタラクティブなレンダリングを fig.write_image(img.png) と比較します。LaTeX タイトルが垂直方向に整列して中央揃えになっており、その要件が含まれている場合はデフォルトのタイトル位置が少し高くなっていれば完了です。

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

評価

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

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

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