Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Annotate animation in plotly

I am working on a filled area animation, very similar to: link

How to I add annotation that will be animated in accordance to the plot animation? that is, how do I make the annotation text appear only when the point it is annotating appears?

like image 566
Yael Green Avatar asked May 04 '26 19:05

Yael Green


1 Answers

The trick is to add

 layout = go.Layout(annotations= [dict( 'my Annotations')])

in to the frame

frames = [dict(data=[], traces=[], layout = go.Layout(annotations= [dict( 'my Annotations')]) )]

Then the annotations will be related to the frame and not to the parent layout

like image 118
EranGrin Avatar answered May 06 '26 10:05

EranGrin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!