yihui / animation

A gallery of animations in statistics and utilities to create animations
https://yihui.org/animation/
205 stars 59 forks source link

Error in saveGIF in R #97

Closed yanswiss closed 7 years ago

yanswiss commented 7 years ago

Hey yihui, I have problems in plot animations in R, so I try your code as following,

however, I still got errors.

1: running command 'C:\Windows\system32\cmd.exe /c "C:\Program Files\ImageMagick-7.0.6-Q16\convert.exe" --version' had status 1 2: running command 'C:\Windows\system32\cmd.exe /c convert --version' had status 4 3: In normalizePath(path.expand(path), winslash, mustWork) : path[1]="C:\Program Files\ImageMagick-7.0.6-Q16/convert.exe": The system cannot find the file specified 4: running command 'C:\Windows\system32\cmd.exe /c "C:\Program Files\ImageMagick-7.0.6-Q16\convert.exe -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png Rplot4.png Rplot5.png Rplot6.png Rplot7.png Rplot8.png Rplot9.png Rplot10.png "animation.gif""' had status 1 5: In cmd.fun(convert) : '"C:\Program Files\ImageMagick-7.0.6-Q16\convert.exe -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png Rplot4.png Rplot5.png Rplot6.png Rplot7.png Rplot8.png Rplot9.png Rplot10.png "animation.gif""' execution failed with error code 1 6: running command '"C:\Program Files\ImageMagick-7.0.6-Q16\convert.exe -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png Rplot4.png Rplot5.png Rplot6.png Rplot7.png Rplot8.png Rplot9.png Rplot10.png "animation.gif""' had status 127

can you help me out ?

thank you yan

yulijia commented 7 years ago

Hello,

Please check if you have installed convert.exe on your computer.

install legacy utilities

img

yanswiss commented 7 years ago

Hi, thank you very much, there is no error now. howevr, I got a gif file, which does not move. it is a still pic. did i miss intalling sth agoan?

thanks

yulijia commented 7 years ago

I am not sure, please show me your Executing code.

like this, img

yanswiss commented 7 years ago

the code is exactly the example you gave: saveGIF({for (i in 1:10) plot(runif(10), ylim = 0:1)})

i just got a plot with 10 still points.

yulijia commented 7 years ago

I have no idea, view your picture in any browser (Chrome ,Firefox, Edge), animation still doesn't play? Sometimes, GIF pictures doesn't animate in windows picture viewer.

If it still doesn't work, remove it and generate a new gif picture again, upload the picture on Github.

yanswiss commented 7 years ago

okay, now it works in Firefox. you are right, not IE. is it supposed still also with imagemagick displayer?

yulijia commented 7 years ago

Maybe, I am not quite sure.

yanswiss commented 7 years ago

anyway, thankssssssssssssssssssssssssss