环圈与动画包R中的GIF [英] loopings GIFs with animation package in R
本文介绍了环圈与动画包R中的GIF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图创建一个与动画
包河但由于某些原因环路一个GIF,即使我设置的选项循环= TRUE
,我做只能播放一次,然后停止图像。我想GIF继续玩下去。任何提示?
install.packages(动画)
库(动画)saveGIF({
对(在1:10ⅰ)情节(runif(10),ylim = 0:1)
},循环= TRUE,间隔= 0.2)
解决方案
我下面的作品。 环路= TRUE
是默认设置。你确定,这个问题是不是在你的GIF观众?
库(动画)ani.options(
转换= shQuote('C:/ Program Files文件(x86)的/ImageMagick-6.8.1-Q16/convert.exe')
)saveGIF(
{
对(在1:10ⅰ)情节(runif(10),ylim = 0:1)
},
movie.name =test.gif
间隔= 0.2,
ani.width = 300,
ani.height = 300,
OUTDIR = getwd()
)
P.S。我猜你的code,因为你有能力生产将.gif文件的工作不加指针到 CONVERT.EXE
程序。
I'm trying to create a GIF that loops with the animation
package in R. But for some reason, even if I set the option loop=TRUE
, the images I make only play once and then stop. I would like the GIF to keep playing indefinitely. Any tips?
install.packages("animation")
library(animation)
saveGIF({
for (i in 1:10) plot(runif(10), ylim = 0:1)
},loop=TRUE,interval=0.2)
解决方案
The following works for me. loop=TRUE
is the default setting. Are you sure that the problem is not in your GIF viewer?
library(animation)
ani.options(
convert = shQuote('C:/Program Files (x86)/ImageMagick-6.8.1-Q16/convert.exe')
)
saveGIF(
{
for (i in 1:10) plot(runif(10), ylim = 0:1)
},
movie.name = "test.gif",
interval = 0.2,
ani.width = 300,
ani.height = 300,
outdir = getwd()
)
p.s. I'm guessing that your code works without the addition of the pointer to the convert.exe
program since you are able to produce the .gif.
这篇关于环圈与动画包R中的GIF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文