How to format text in annotation

Hi,

In this example, I assume you have formatted the string using $$. When I run this example, if I use the same syntax the annotation is not displayed. If I remove the $$ the annotation is displayed but in a rather basic format.

What are the $ format and why it is not working?

Cheers

I do not know why you are not seeing the same annotation as the example. However, the $ symbols are there to tell plotly that you are using a LaTeX typesetting for the string you are creating.
See: https://plot.ly/python/LaTeX/

When I look at your example, the text in the hovering looks like this:
42

Is it what is expected?

Hi @nbosc,

You may want to keep an eye on https://github.com/plotly/plotly.py/issues/515, it looks like there are several issues cropping up with latex typesetting in various contexts.