# Animation using frames in Dash for Julia

**URL:** <https://community.plotly.com/t/animation-using-frames-in-dash-for-julia/57836>\
**Category:** Dash Julia\
**Created:** [October 23, 2021, 6:21am UTC](https://community.plotly.com/t/animation-using-frames-in-dash-for-julia/57836 "2021-10-23T06:21:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvalero](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/cvalero/32/16563_2.png) [@cvalero](https://community.plotly.com/u/cvalero)\
**Post date:** [October 23, 2021, 6:21am UTC](https://community.plotly.com/t/animation-using-frames-in-dash-for-julia/57836/1 "2021-10-23T06:21:13Z")

</div>

Hi,

I have been trying to do animation in Dash for Julia using frames (see the Simple Play Button Demo at [Intro to Animations | Python | Plotly](https://plotly.com/python/animations/)) . I managed to make that demo work for Dash in Python but after translating it to Dash for Julia I had no luck. The code is as follows:

````auto
using Dash, DashHtmlComponents, DashCoreComponents

app = dash()

frames = [
    Dict(:data => [Dict(:x => [1, 2], :y => [1, 2])]),
    Dict(:data => [Dict(:x => [1, 4], :y => [1, 4])]),
    Dict(:data => [Dict(:x => [3, 4], :y => [3, 4])]),
]

play_button = [
    Dict(
        :type => "buttons",
        :buttons => [Dict(:label => "Play", :method => "animate", :args => [nothing])],
    ),
]

layout = Dict(
    :xaxis => Dict(:range => [0, 5], :autorange => false),
    :yaxis => Dict(:range => [0, 5], :autorange => false),
    :updatemenus => [
        Dict(
            :type => "buttons",
            :buttons => [Dict(:label => "Play", :method => "animate", :args => [nothing])],
        ),
    ],
)

f0 = [Dict(:x => [0, 1], :y => [0, 1])]
fig = Dict(:data => f0, :layout => layout)
app.layout = html_div([html_h4("Animation"), dcc_graph(id = "graph1", figure = fig)])

run_server(app, "0.0.0.0", debug = true)```

````

Hopefully someone will be able to see something I am missing

Thanks!

---

<div class="post-metadata">

**Author:** ![iuliancioarca](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@iuliancioarca](https://community.plotly.com/u/iuliancioarca)\
**Post date:** [October 25, 2021, 3:10pm UTC](https://community.plotly.com/t/animation-using-frames-in-dash-for-julia/57836/2 "2021-10-25T15:10:16Z")

</div>

I asked a similar question [here](https://github.com/plotly/Dash.jl/issues/98#event-5508730170)  
I hope this helps.

---

<div class="post-metadata">

**Author:** ![cvalero](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/cvalero/32/16563_2.png) [@cvalero](https://community.plotly.com/u/cvalero)\
**Post date:** [October 26, 2021, 3:17am UTC](https://community.plotly.com/t/animation-using-frames-in-dash-for-julia/57836/3 "2021-10-26T03:17:29Z")

</div>

Thank you for the link!
