plotly.py
plotly.py copied to clipboard
write_html is not rendering Latex
The following example produces two figures, one rendered in the browser using fig.show()
displays the latex text correct. The other one using fig.write_html
does not render latex.
import plotly.express as px
df = px.data.tips()
fig = px.histogram(df, x="total_bill")
fig.update_layout(
yaxis=dict(
title= r"$\Huge{\text{test}}$",
side="left",
)
)
fig.show()
fig.write_html("test.html")
You'll need to use the include_mathjax
argument to write_html()
for this to work.
It works fine
pythonfig.write_html(..., include_mathjax="cdn")