Latex in 3D scatter figure and axis titles

Hello, I do have a problem since my code does not allow to render Latex formatting:

fig.update_layout(
    scene=dict(
        xaxis_title=r'X AXIS TITLE (cm$^2$)',
        yaxis_title=r'Y AXIS TITLE (cm$^2$)',
        zaxis_title=r'Z AXIS TITLE (cm$^2$)'
    ),
    width=700,
    margin=dict(r=20, b=10, l=10)
)

@PVS1M LaTeX has never worked for axis title in 3d. An alternative for your particular example is to use the html tag, sup:

fig.update_layout(
    scene=dict(
        xaxis_title='cm<sup>2</sup>',
        yaxis_title='cm<sup>2</sup>',
        zaxis_title='cm<sup>2</sup>'
    ))
1 Like