# How to make animated bar chart in julia?

**URL:** <https://discourse.julialang.org/t/how-to-make-animated-bar-chart-in-julia/45168>\
**Category:** General Usage\
**Tags:** plotting, bar\
**Created:** [August 18, 2020, 4:20pm UTC](https://discourse.julialang.org/t/how-to-make-animated-bar-chart-in-julia/45168 "2020-08-18T16:20:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hafez\_ahmad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hafez_ahmad/32/14423_2.png) [@hafez\_ahmad](https://discourse.julialang.org/u/hafez_ahmad)\
**Post date:** [August 18, 2020, 4:20pm UTC](https://discourse.julialang.org/t/how-to-make-animated-bar-chart-in-julia/45168/1 "2020-08-18T16:20:19Z")

</div>

I like to make an animated (gif) bar plot year wise. I have attached the [gdp per capita.csv](https://raw.githubusercontent.com/amankharwal/Website-data/master/gdp%20per%20capita.csv). I can make it using python Matplollib but how I can make it in Julia plot makie ?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/c/dc0efdbe7c443e42a3ba46ac302f59482c6ab271.png)

thanks in advance 😊 😊 😊

---

<div class="post-metadata">

**Author:** ![mthelm85](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mthelm85/32/224164_2.png) [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Post date:** [August 18, 2020, 4:29pm UTC](https://discourse.julialang.org/t/how-to-make-animated-bar-chart-in-julia/45168/2 "2020-08-18T16:29:58Z")

</div>

Have you had a look at the Makie.jl docs on this?

[http://makie.juliaplots.org/dev/animation.html](http://makie.juliaplots.org/dev/animation.html)

Or, the Plots.jl docs?

[http://docs.juliaplots.org/latest/animations/](http://docs.juliaplots.org/latest/animations/)

---

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [August 19, 2020, 12:03pm UTC](https://discourse.julialang.org/t/how-to-make-animated-bar-chart-in-julia/45168/3 "2020-08-19T12:03:21Z")

</div>

You don’t need Makie do that, it’s plain simple in Julia Plots.

If you want to see the GIF directly, use

```julia
@gif for i ∈ 1:n
    <insert plot function for one frame here>
end

```

If you want to save it as GIF or some other format (for example, I find MP4 very useful):

```julia
anim = @animate for i ∈ 1:n
     <same as above>
end

```

and then save it

```julia
gif(anim, "path/to/file", fps=2)

```
