Hello, everybody!
I have a string with two dollar sign, and I want to be used as a text annotation below my plot.
This code created a string and you can see its output.
str=f"Maximum: {a} , ${numerize.numerize(b)}\t"+f"Minimum: {c} , ${numerize.numerize(d)}"
print(str)
Output: Maximum: 1396 , $544.41M Minimum: 1399 , $255.31M
but when I use str in below, plotly changes font and shows unexpected characters:
annotations = []
annotations.append(dict(xref='paper', yref='paper', x=0.5, y=-0.15,
xanchor='center', yanchor='top',
text=str,
font=dict(family="Courier New",
size=14,
color='rgb(100,100,100)'),
showarrow=False))
fig.update_layout(annotations=annotations)
and the result in plot:
How can I fix this issue? Thanx.