# Animations with PlotlyJS?

**URL:** <https://discourse.julialang.org/t/animations-with-plotlyjs/34633>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [February 14, 2020, 3:40pm UTC](https://discourse.julialang.org/t/animations-with-plotlyjs/34633 "2020-02-14T15:40:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [February 14, 2020, 3:40pm UTC](https://discourse.julialang.org/t/animations-with-plotlyjs/34633/1 "2020-02-14T15:40:22Z")

</div>

Has anyone put together an animated plot using PlotlyJS to display the progress of a computation (so not a postprocessed gif and such)? If so, is there an example?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [February 18, 2020, 3:18am UTC](https://discourse.julialang.org/t/animations-with-plotlyjs/34633/2 "2020-02-18T03:18:46Z")

</div>

FYI: PlotlyJS.jl turns out to be quite capable with respect to animated graphics, displayed from a running program. Kudos to @sglyon!  
[![s](https://global.discourse-cdn.com/julialang/original/3X/6/d/6d65573860160b1ed62c148112087ad5f274f60e.gif)](https://www.dropbox.com/s/jt3jcr4q3zo7zky/argyris-vib-anim.gif?dl=0)  
`addtraces!` and `deletetraces!` did not work. Perhaps I was doing it wrong. But `react!` was just the ticket.  
Code at [GitHub - PetrKryslUCSD/FinEtoolsFlexBeams.jl: Finite Element tools in Julia: large-displacement response of 3D flexible frame structures](https://github.com/PetrKryslUCSD/FinEtoolsFlexBeams.jl)

---

<div class="post-metadata">

**Author:** ![sglyon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sglyon/32/67_2.png) [@sglyon](https://discourse.julialang.org/u/sglyon)\
**Post date:** [February 18, 2020, 5:22am UTC](https://discourse.julialang.org/t/animations-with-plotlyjs/34633/3 "2020-02-18T05:22:03Z")

</div>

Looks exciting! Great work

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [February 18, 2020, 4:22pm UTC](https://discourse.julialang.org/t/animations-with-plotlyjs/34633/4 "2020-02-18T16:22:56Z")

</div>

The next step would be to have the program run ahead, updating the graphics, and to also give some time to the event loop in the figure. How do I do that? Any ideas?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [February 29, 2020, 4:49am UTC](https://discourse.julialang.org/t/animations-with-plotlyjs/34633/5 "2020-02-29T04:49:42Z")

</div>

To answer my own question: I don’t think that is possible with PlotlyJS, the communication is one-way.

---

<div class="post-metadata">

**Author:** ![Djamil\_Lakhdar-Hamin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djamil_lakhdar-hamin/32/19910_2.png) [@Djamil\_Lakhdar-Hamin](https://discourse.julialang.org/u/Djamil_Lakhdar-Hamin)\
**Post date:** [November 16, 2022, 6:58pm UTC](https://discourse.julialang.org/t/animations-with-plotlyjs/34633/6 "2022-11-16T18:58:06Z")

</div>

Can you post an example using react? There is no documentation. This seems to be a serious problem with Julia. Awful documentation.

---

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [November 17, 2022, 1:17am UTC](https://discourse.julialang.org/t/animations-with-plotlyjs/34633/7 "2022-11-17T01:17:16Z")

</div>

Firstly, it’s fairly rude to both make generalisations about a whole programming ecosystem; yes, documentation does vary from the minimal to the excellent.

Secondly, you should try to create new posts if you are adding a new question to an old thread.

To your question, the link to the code example is in the first reply. You can see a similar follow up here too:

> [@Animation using PlotlyBase](https://discourse.julialang.org/t/animation-using-plotlybase/63292):
>
> Dear PlotlyBase community, Is there a way how to get animation from [Animations · Plots](https://docs.juliaplots.org/latest/animations/) using pure PlotlyBase package?
