[BUG]: Subplot LaTeX titles misaligned
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
Description
make_subplots produces plots with misaligned LaTeX titles:
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided Python reproduction with plotly 6.8.0, starting at make_subplots and the subplot-title positioning path. Compare interactive rendering with fig.write_image(img.png); done means the LaTeX titles are vertically aligned and centered, with the default title position slightly higher if that request is included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100