Skip to content

kaleido not using latex for text #388

@GavinHuttley

Description

@GavinHuttley

I'm not sure if this is a bug or some quirk of my system, since I can see from #360 that others are able to get latex rendering working.

If anyone can reproduce, let me know!

Steps to reproduce

On macOS 15.6, created a conda environment as

mamba create -n delme python=3.13

Activated the environment then pip installed plotly and kaleido

pip install "plotly[express]" kaleido pandas

Installed the chrome dependency as

choreo_get_chrome

Then ran the following python in a script

import plotly.express as px
import numpy.random

x = numpy.random.normal(size=1000)
y = numpy.random.normal(size=1000)

fig = px.scatter(x=x, y=y, labels={"y": r"$\chi^2$", "x": "Random Points"})
fig.add_annotation(
    text=r"$\chi^2$",
    x=0.1,
    y=0.9,
    xref="paper",
    yref="paper",
    showarrow=False,
    font=dict(size=14, color="black"),
)
fig.write_image("plotly-latex.png", scale=3)

It should display $\chi^2$ instead of the input string.

Image

Metadata

Metadata

Assignees

Labels

P2needed for current cycle

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions