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.
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/