@reot4424
You can use LaTeX strings instead of html tags to define annotations, plot title, axis title or even text in scatter plots, but for unknow reasons, not in Bar trace:
import plotly.graph_objects as go
text =["$V_0^{**}$", "$V_1^{**}$", "$\\text{Here is: }V_2^{**}$", "$V_3^{**}$"]
fig1 = go.Figure(go.Scatter(x=[2,3,4,5], y=[ 2,3,1, 2.6], text=text,
textposition =["bottom center", "top center", "bottom center", "top center"],
mode="lines+text"))
fig1.update_layout(width=700, height=450, yaxis_range=[0.75, 3.25],
xaxis_title="$\\text{My LaTeX title: } H_n^q$")
fig1.add_annotation(x=4, y=2,
text="$V_O^{**}$",
font_size=16,
showarrow=False)
With the same text list as above, the LaTeX strings are not rendered correctly for a Bar trace:
fig2 = go.Figure(go.Bar(x=[2,3,4,5], y=[ 2,3,1, 2.6], text=text, textposition="outside"))
fig2.update_layout(width=700, height=450, yaxis_range=[0, 3.25])
This is a plotly.js bug. Iโm I right @archmoj ?