# Error creating animation w/Plots.jl

**URL:** <https://discourse.julialang.org/t/error-creating-animation-w-plots-jl/2602>\
**Category:** Visualization\
**Created:** [March 11, 2017, 4:55am UTC](https://discourse.julialang.org/t/error-creating-animation-w-plots-jl/2602 "2017-03-11T04:55:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_McBane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sean_mcbane/32/4580_2.png) [@Sean\_McBane](https://discourse.julialang.org/u/Sean_McBane)\
**Post date:** [March 11, 2017, 4:55am UTC](https://discourse.julialang.org/t/error-creating-animation-w-plots-jl/2602/1 "2017-03-11T04:55:08Z")

</div>

I am trying to make an animation using Plots.jl; the simple interface is really great. Unfortunately, it doesn’t work. It appears to be passing an invalid argument for ImageMagick. The error I get is:

```julia
Invalid Parameter - 10
WARNING: Tried to create gif using convert (ImageMagick), but got error: ErrorException("failed process: Process(`conver
t -delay 10 -loop 0 'C:\\Users\\seanm\\AppData\\Local\\Temp\\jl_C8F6.tmp\\*.png' -alpha off 'C:\\Users\\seanm\\Dropbox\\
Code\\Julia\\test_gif.gif'`, ProcessExited(4)) [4]")
ImageMagick can be installed by executing `Pkg.add("ImageMagick")`

```

I do have ImageMagick installed; I want to make sure I’m not missing something essential before submitting it as a bug… This code reproduces the problem:

```
using Plots

x = [i for i = 0:0.1:10]
anim = @animate for i = 1:10
    plot(x, map(u -> sin(i*π*u), x))
end

gif(anim, "./test_gif.gif", fps=10)

```

Platform is 64-bit Windows; my Julia is 0.5.0 on the machine where I have the problem since I haven’t gotten around to upgrading this one; I haven’t tested on 5.1 yet.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [March 11, 2017, 5:05am UTC](https://discourse.julialang.org/t/error-creating-animation-w-plots-jl/2602/2 "2017-03-11T05:05:15Z")

</div>

ImageMagick.jl has some odd installation problems on Windows.

[https://github.com/JuliaIO/ImageMagick.jl/issues/52](https://github.com/JuliaIO/ImageMagick.jl/issues/52)  
[https://github.com/JuliaPlots/Plots.jl/issues/516](https://github.com/JuliaPlots/Plots.jl/issues/516)

But may have been fixed with

[https://github.com/JuliaIO/ImageMagick.jl/pull/67](https://github.com/JuliaIO/ImageMagick.jl/pull/67)

?

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [March 11, 2017, 7:33am UTC](https://discourse.julialang.org/t/error-creating-animation-w-plots-jl/2602/3 "2017-03-11T07:33:22Z")

</div>

I get a very similar error on Mac. I should say I have very recurrent errors with ImageMagick so maybe something is corrupted with the installation of that package on my system. Not sure whether the error is in ImageMagick or Plots.  
Btw, you can simplify your call a little and don’t need x:

```julia
anim = @animate for i = 1:10
    plot(u -> sin(i*π*u), 0, 10)
end

```
