# Save gif with a filename

**URL:** <https://discourse.julialang.org/t/save-gif-with-a-filename/91448>\
**Category:** Visualization\
**Tags:** question, plotting\
**Created:** [December 8, 2022, 10:17pm UTC](https://discourse.julialang.org/t/save-gif-with-a-filename/91448 "2022-12-08T22:17:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sky](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sky](https://discourse.julialang.org/u/sky)\
**Post date:** [December 8, 2022, 10:17pm UTC](https://discourse.julialang.org/t/save-gif-with-a-filename/91448/1 "2022-12-08T22:17:07Z")

</div>

Hi everyone!  
I’m looking at creating gif in this link  
[https://docs.juliaplots.org/latest/animations/](https://docs.juliaplots.org/latest/animations/)  
and I’m wondering how to save gif with a filename without using `@animate`.  
For example, the following code would generate a gif file with filename “tmp.gif”. How can I specify the filename in the code without using `@animate`?

```julia
n = 400
t = range(0, 2π, length = n)
x = 16sin.(t).^3
y = 13cos.(t) .- 5cos.(2t) .- 2cos.(3t) .- cos.(4t)

@gif for i ∈ 1:n
    circleplot(x, y, i, line_z = 1:n, cbar = false, c = :reds, framestyle = :none)
end when i > 40 && mod1(i, 10) == 5

```

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 8, 2022, 10:25pm UTC](https://discourse.julialang.org/t/save-gif-with-a-filename/91448/2 "2022-12-08T22:25:39Z")

</div>

If `@animate` does the same job, why would you need something else?

---

<div class="post-metadata">

**Author:** ![sky](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sky](https://discourse.julialang.org/u/sky)\
**Post date:** [December 8, 2022, 10:28pm UTC](https://discourse.julialang.org/t/save-gif-with-a-filename/91448/3 "2022-12-08T22:28:22Z")

</div>

Sounds good!
