Skip to content

[BUG]: Subplot LaTeX titles misaligned #5624

@sursu

Description

@sursu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions