GithubHelp home page GithubHelp logo

thomasp85 / gganimate Goto Github PK

View Code? Open in Web Editor NEW
1.9K 60.0 308.0 53.68 MB

A Grammar of Animated Graphics

Home Page: https://gganimate.com

License: Other

R 100.00%
rstats ggplot2 animation transition data-visualization ggplot-extension

gganimate's Introduction

gganimate

R-CMD-check CRAN_Status_Badge CRAN_Download_Badge Codecov test coverage

gganimate extends the grammar of graphics as implemented by ggplot2 to include the description of animation. It does this by providing a range of new grammar classes that can be added to the plot object in order to customise how it should change with time.

  • transition_*() defines how the data should be spread out and how it relates to itself across time.
  • view_*() defines how the positional scales should change along the animation.
  • shadow_*() defines how data from other points in time should be presented in the given point in time.
  • enter_*()/exit_*() defines how new data should appear and how old data should disappear during the course of the animation.
  • ease_aes() defines how different aesthetics should be eased during transitions.

An Example

All of the above might seem a bit abstract. Let’s try with a contrived example:

library(ggplot2)
library(gganimate)

ggplot(mtcars, aes(factor(cyl), mpg)) + 
  geom_boxplot() + 
  # Here comes the gganimate code
  transition_states(
    gear,
    transition_length = 2,
    state_length = 1
  ) +
  enter_fade() + 
  exit_shrink() +
  ease_aes('sine-in-out')

Here we take a simple boxplot of fuel consumption as a function of cylinders and lets it transition between the number of gears available in the cars. As this is a discrete split (gear being best described as an ordered factor) we use transition_states and provides a relative length to use for transition and state view. As not all combinations of data is present there are states missing a box. We define that when a box appears it should fade into view, whereas at should shrink away when it disappear. Lastly we decide to use a sinusoidal easing for all our aesthetics (here, only y is changing)

Installation

gganimate is available on CRAN and can be installed with install.packages('gganimate'). If you wish to install the development version you can install directly from github using devtools:

# install.packages('pak')
pak::pak('thomasp85/gganimate')

Yet Another Example

It is impossible to cover everything possible with gganimate in a README, but animations are fun, so let’s at least have one more:

library(gapminder)

ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, colour = country)) +
  geom_point(alpha = 0.7, show.legend = FALSE) +
  scale_colour_manual(values = country_colors) +
  scale_size(range = c(2, 12)) +
  scale_x_log10() +
  facet_wrap(~continent) +
  # Here comes the gganimate specific bits
  labs(title = 'Year: {frame_time}', x = 'GDP per capita', y = 'life expectancy') +
  transition_time(year) +
  ease_aes('linear')

In this example we see the use of transition_time() which can be used with continuous variables such as year. With this transition it is not necessary to provide transition and state length as the “transition variable” provides this directly (e.g. it should take twice as long to transition between 1980 and 1990 compared to 2000 to 2005). We also see the use of string literal interpolation in titles. gganimate lets you specify variables to evaluate inside titles and different transitions provide different type of information to use.

Where is my animation?

gganimate mimics the way ggplot2 renders its output, in that the rendering is done automatically when the gganim object is printed. Under the hood, the animate() function is called which renders the frame and passes the frames to a renderer functions which takes care of combining them to the final animation. The default renderer is gifski_renderer() which returns a gif_image object which is a simple wrapper around a path to a gif file. If animate() has been called implicitly as part of print the gif_image object is available using the last_animation() function (analogous to ggplot2::last_plot()). In order to save the animation to a specific location, you can use the anim_save() function which, like ggplot2::ggsave, defaults to taking the last rendered animation and writes it to a file.

I don’t like gifs…

gif is a fantastic format for animations due to its wide support, but sometimes another format is required. gganimate is agnostic to the renderer and while the default is to use gifski to combine the frames into a gif, it doesn’t have to be so. By passing an alternate renderer to the animate() function you can control the animation format, and gganimate comes with a bunch (and you can write your own). To create video files you can e.g. use the ffmpeg_renderer():

p <- ggplot(airquality, aes(Day, Temp)) + 
  geom_line(size = 2, colour = 'steelblue') + 
  transition_states(Month, 4, 1) + 
  shadow_mark(size = 1, colour = 'grey')
animate(p, renderer = ffmpeg_renderer())

Video output are automatically embedded in RMarkdown documents, but GitHub strips video when rendering READMEs so you can’t see it here

Further there’s support for rendering to sprite sheets if that is your vice.

Old API

This is the second iteration of the gganimate package. The first, developed by David Robinson had a very different API, and relied on specifying animation frame membership inside aes() blocks in the geom_*() calls. This approach was easy to grasp, but essentially limited in capabilities and has thus been abandoned for a more thorough grammar.

Code written for the old API will not work with this gganimate version and there will not come a future support for it. If you wish to continue using the old API then avoid upgrading gganimate. If you’ve already upgraded and wish to downgrade, the latest version of the old API is available as a GitHub release.

If you wish to convert your old animations to the new API, the closest you get is probably with transition_manual, even though it is not completely substitutable:

# Old code
ggplot(mtcars) + 
  geom_boxplot(aes(factor(cyl), mpg, frame = gear))

# New code
ggplot(mtcars) + 
  geom_boxplot(aes(factor(cyl), mpg)) + 
  transition_manual(gear)

gganimate's People

Contributors

alperyilmaz avatar assignuser avatar brovic avatar clauswilke avatar cpsievert avatar davidski avatar dgrtwo avatar dmi3kno avatar ezequielpaura avatar howardbaek avatar jayhesselberth avatar jeroen avatar jimhester avatar jkitching avatar kanishkamisra avatar khailper avatar kzenstratus avatar michaelchirico avatar pierreroudier avatar rfaelens avatar rsaporta avatar sgschreiber avatar teunbrand avatar thomasp85 avatar tjebo avatar yihui avatar yunching avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gganimate's Issues

cannot find ImageMagick with convert = "convert"

I have run gganimations on Windows 8.1, R 3.4.0. when i run function gganimation(). the error as follow:
I cannot find ImageMagick with convert = "convert"
but I can find it from the Registry Hive: D:\ImageMagick\ImageMagick-7.0.5-Q16

the i try do some operations:

system("convert -version")
Invalid drive specification.
Warning message:
running command 'convert -version' had status 4

shell("convert -version")
Invalid drive specification.
Warning message:

how can i solve this problem

Cannot output to mp4 file with spaces in file name

I tried running the tweenr "Dancing Ball" example, but switching the output format to mp4. ffmpeg gives an error about "dancing", which is the file name up to the first space. Replacing the space with an underscore makes it work as expected.

> gg_animate(p, "dancing ball.mp4", title_frame = F, ani.width = 400, 
+            ani.height = 400)
Executing: 'ffmpeg' -y -r 15 -i Rplot%d.png -pix_fmt yuv420p dancing ball.mp4
ffmpeg version 2.8.6-1ubuntu2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311
  configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, image2, from 'Rplot%d.png':
  Duration: 00:00:15.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 400x400, 25 fps, 25 tbr, 25 tbn, 25 tbc
[NULL @ 0x10bdbe0] Unable to find a suitable output format for 'dancing'
dancing: Invalid argument
Error in file(file, "rb") : cannot open the connection
In addition: Warning message:
In file(file, "rb") :
  cannot open file 'dancing ball.mp4': No such file or directory

Error in file(file, "rb") : cannot open the connection

When i install the package using
devtools::install_github("dgrtwo/gganimate",force = TRUE)
i get the following

Downloading GitHub repo dgrtwo/gganimate@master
from URL https://api.github.com/repos/dgrtwo/gganimate/zipball/master
Installing gganimate
"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/Pruttkontoret/AppData/Local/Temp/RtmpI3GkOA/devtools10e4635a3603/dgrtwo-gganimate-bf82002"  \
  --library="C:/Users/Pruttkontoret/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'gganimate' ...
** R
** tests
** preparing package for lazy loading
** help
Warning: C:/Users/Pruttkontoret/AppData/Local/Temp/RtmpI3GkOA/devtools10e4635a3603/dgrtwo-gganimate-bf82002/man/gganimate_save.Rd:19: unexpected RCODE '[pkg=ggplot2]{ggsave', expecting '{'
Warning: C:/Users/Pruttkontoret/AppData/Local/Temp/RtmpI3GkOA/devtools10e4635a3603/dgrtwo-gganimate-bf82002/man/gganimate_save.Rd:20: unexpected RCODE '[pkg=animate]{saveVideo', expecting '{'
Warning: C:/Users/Pruttkontoret/AppData/Local/Temp/RtmpI3GkOA/devtools10e4635a3603/dgrtwo-gganimate-bf82002/man/gganimate_save.Rd:20: unexpected '}'
Warning: C:/Users/Pruttkontoret/AppData/Local/Temp/RtmpI3GkOA/devtools10e4635a3603/dgrtwo-gganimate-bf82002/man/gganimate_save.Rd:20: All text must be in a section
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (gganimate)
Reloading installed gganimate

It does say it was successful but also it shows warnings during installation.
running
p <- ggplot(mtcars, aes(wt, mpg, frame = am)) + geom_point()
gganimate(p)
i get the following error message
'C:\Program' is not recognized as an internal or external command, operable program or batch file. Show Traceback Error in file(file, "rb") : cannot open the connection

I have Imagemagick installed.

If i run the plot by only printing p i do get a static plot.

Supress printing in the title

I have a ggplot I've been building, and as a last step, add frame as a new aesthetic. But now my title incorporates the frame indicator. I actually use this elsewhere in the plot (via geom_text), and so don't want it in the title. It's unclear how to stop this behavior by gg_animate().

Cannot change resolution of output

Great work on the package, it's really useful.

I'm putting together a gif to use in a presentation but can't work out if I can alter the resolution of the output from gg_animate(). Ideally, I'd like to be able to have a full screen .gif that isn't grainy.

Is there any way to alter the resolution of outputs in gganimate?

error with loop=FALSE option

Taking the example from the README, which I can reproduce without issue, and adding what I think is the correct library (library(animate)) and options calls (ani.options(loop = FALSE)):

library(gapminder)
library(ggplot2)
library(gganimate)
library(animate)
theme_set(theme_bw())
ani.options(loop = FALSE)
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
  geom_point() +
  scale_x_log10()
gg_animate(p)

I encounter the following error:

Executing: 
'convert' -loop FALSE -delay 100 Rplot1.png Rplot2.png Rplot3.png
    Rplot4.png Rplot5.png Rplot6.png Rplot7.png Rplot8.png Rplot9.png
    Rplot10.png Rplot11.png Rplot12.png 'filef899fc930d.gif'
convert: invalid argument for option `-loop': FALSE @ error/convert.c/ConvertImageCommand/2024.
an error occurred in the conversion... see Notes in ?im.convert
Error in file(file, "rb") : cannot open the connection
In addition: Warning messages:
1: In normalizePath(movie.name) :
  path[1]="filef899fc930d.gif": No such file or directory
2: In file(file, "rb") :
  cannot open file '/var/folders/p8/8d4g5v_53t3glcsclzx5cc8h0000gn/T//RtmptnzNkU/gganimate/filef899fc930d.gif': No such file or directory

[Running R 3.3.1 "Bug in your hair" on Mac OS X 10.11.6]

date objects in title

I believe that date objects are converted incorrectly into the titles of gg_animate graphs. Easy fix with coercing the dates into characters from what I can tell, at least from the end-user perspective. LMK if you need any clarification!

gapminder <- gapminder %>% mutate(year2 = as.Date(ifelse(
  year == 1977,
  "1977-01-01",
  "1967-01-01"))
)

# weird titles
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year2)) +
  geom_point() +
  scale_x_log10()
gg_animate(p)

# fixed titles
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = as.character(year2))) +
  geom_point() +
  scale_x_log10()
gg_animate(p)

GraphicsMagick instead of ImageMagick

Hello.

Could you add an example (and the options) working with GraphicsMagick, please?

I've tried with
animation::ani.options( convert="gm convert")
and animation::ani.options(convert="gm.exe convert")
My GraphicsMagick is in the path.
I've also tried with the full path to the executable.

But it doesn't work, gganimate still tries to find ImageMagick, that is supposed to be slower and older.

Regards.

Cannot get ggplot to recognize frame aesthetic

First time using gganimate and I can't seem to find a solution to this anywhere on the interwebs.

I've successfully installed and loaded gganimate

library("devtools")
devtools::install_github("dgrtwo/gganimate")
library("gganimate")

Yet whenever I try to define the frame in AES, I cannot get ggplot to recognize it. EX:

 ggplot(FinSet, aes(exponent_estimate,frame=WindowID)) +
     geom_density(alpha = 0.1, size=.5,aes(group=Country, colour=Country, fill=Country, frame=WindowID)) + 
     xlim(0, 10) +
     ggtitle("Plot Plot")+
     theme(legend.position="none")

Warning: Ignoring unknown aesthetics: frame

Apologies if this is a simple mistake or the wrong place for this!

Display in RStudio Viewer

First off, really cool work with this package. I wish this had been around when I was teaching statistics 😄 . A few ideas to enhance the utility of this package.

Display in RStudio

It would be nice if gganimate output could be displayed in RStudio viewer. Here is some quick and dirty code to do it.

p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
  geom_point() +
  scale_x_log10()

tf <- tempfile(fileext = '.gif')
gg_animate(p, tf, autobrowse = FALSE)
d <- htmltools::tags$img(src = base64encode::dataURI(file = "output.gif", mime="image/gif"))
htmltools::browsable(d)

Animation with Controls

This is possible with scianimator, but I find it really clunky, and the jquery requirement makes it meaty. If gganimate can return an array of image paths, it should not be hard to write a htmlwidget that would display it with controls. I can prototype something for you if this is of interest.

Warning during installation

I'm getting these warning messages during installation.
Warning: /private/var/folders/w0/zf6n6gbd2kd0jlvsm9hlb6kw0000gn/T/RtmpAZWgMX/devtoolsb03697ffe34/dgrtwo-gganimate-0e7b8ae/man/gganimate_save.Rd:19: unexpected RCODE '[pkg=ggplot2]{ggsave', expecting '{' Warning: /private/var/folders/w0/zf6n6gbd2kd0jlvsm9hlb6kw0000gn/T/RtmpAZWgMX/devtoolsb03697ffe34/dgrtwo-gganimate-0e7b8ae/man/gganimate_save.Rd:20: unexpected RCODE '[pkg=animate]{saveVideo', expecting '{' Warning: /private/var/folders/w0/zf6n6gbd2kd0jlvsm9hlb6kw0000gn/T/RtmpAZWgMX/devtoolsb03697ffe34/dgrtwo-gganimate-0e7b8ae/man/gganimate_save.Rd:20: unexpected '}' Warning: /private/var/folders/w0/zf6n6gbd2kd0jlvsm9hlb6kw0000gn/T/RtmpAZWgMX/devtoolsb03697ffe34/dgrtwo-gganimate-0e7b8ae/man/gganimate_save.Rd:20: All text must be in a section

But the package loads after this. When I use gganimate() to animate a plot, I get the following errors and warnings:

sh: convert: command not found Error in cmd.fun(sprintf("%s --version", convert), intern = TRUE) : error in running command I cannot find ImageMagick with convert = 'convert' Error in file(file, "rb") : cannot open the connection In addition: Warning messages: 1: In animation::im.convert(filenames[-1], basename(filename), extra.opts = opts, : Please install ImageMagick first or put its bin path into the system PATH variable 2: In file(file, "rb") : cannot open file '/var/folders/w0/zf6n6gbd2kd0jlvsm9hlb6kw0000gn/T//RtmpAZWgMX/gganimate/fileb03520a3e08.gif': No such file or directory

convert argument too long

I tried to gganimate a full day of flights over Europe.
I did plot a density 2d of position report for every minute in a day.
So I have 1440 Rplot<x>.png images for convert to put together in an animated gif.

Here is the code:

map <- get_map(location=c(lon=15.0, lat=50.0),zoom = 4, color='bw')
files_csv <- dir("data/", pattern = "2017-02-21_..\\.csv", full.names = TRUE)
bm <- import_fr24_csv(files_csv) # a dataframe w/ cols: frame, lon, lat
p <- ggmap(map) +
  geom_density_2d(data = bm, aes(x = lon, y = lat, frame = frame))
gganimate(p, filename = "2017-02-21-1min.gif", title_frame = FALSE)

But I get the following error:

Executing: 
"convert -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png Rplot4.png Rplot5.png Rplot6.png
    Rplot7.png Rplot8.png Rplot9.png Rplot10.png Rplot11.png Rplot12.png Rplot13.png Rplot14.png
    Rplot15.png Rplot16.png Rplot17.png Rplot18.png Rplot19.png Rplot20.png Rplot21.png Rplot22.png
    Rplot23.png Rplot24.png Rplot25.png Rplot26.png Rplot27.png Rplot28.png Rplot29.png Rplot30.png
    ...    
    Rplot606.png Rplot607.png Rplot608.png Rplot609.png RpThe command line is too long.
    an error occurred in the conversion... see Notes in ?im.convert
    ....

I have been able to generate the animated GIF manually from the temporarily create PNG's with
a workaround I found here, i.e. ImageMagick can avoid the "Argument too long" issue with the underlying shell by using its own filename globbing method, hence the "*.png" (note the quotes ")

$ convert -loop 0 -delay 10 "*.png" ~/anim.gif

but to properly get the right sequence of PNG's I had to overcome one shortcoming of the package (or the dependent ones):

  • temporary plots have a name like Rplot<index>.png, where index = 1..n.
    In my case n = 1440, so I have Rplot1.png, Rplot2.png ... Rplot1440.png
    This does not work well when you have to list them in order like with "*.png"

My (manual) solution was to zero pad the relevant files in order to have Rplot0001.png, Rplot0002.png ... Rplot1440.png.

In summary the issue I faced could require the following 2 changes:

  • define a naming convention for the temporary plots that is lexicographically ordered
  • use the patter above to issue a globbed execution of the convert program

using a factor variable as frame aesthetic

I am so happy about this package! So great. I am having no problems when using an integer (such as year) for the frame aesthetic, but when I try to use any factor variable for the frame aesthetic, it is using the underlying integer instead of the factor values and not finding any data. For example, if I try the code from the README to animate over continents,

p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, frame = continent)) +
  geom_point() +
  scale_x_log10()

gg_animate(p)

I cannot reproduce the plot. It makes the plot with the correct axes and legend, but instead of the correct word title, it puts the integer that is underneath the factor level. Also, no data is plotted, I guess because it is trying to match the integer instead of the factor level? I've attached one of the images it makes.

rplot

Here is my session info, in case it is something on my end:

R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.2 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] gapminder_0.2.0 gganimate_0.1   ggplot2_2.0.0  

loaded via a namespace (and not attached):
 [1] labeling_0.3     colorspace_1.2-6 scales_0.3.0     plyr_1.8.3       tools_3.2.3      gtable_0.1.2    
 [7] Rcpp_0.12.3      grid_3.2.3       knitr_1.12.3     digest_0.6.9     munsell_0.4.2 

Stripping background for animation causes problems with theme

When I add some theme options, like so:

library(ggplot2)
libra
library(gapminder)
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
    geom_point() +
    scale_x_log10() + theme(text=element_text(size=25))
gganimate(p, "output.gif", height=5, width=5)

I get something like this:
output

I think this is because of the way the background is stripped out to server as a background while creating GIFs.

Overall I'm unsure whether background should be stripped this way. There are several situations I can envisage where one would want to have the background update (for instance, if you are zooming in and out of data). I may revert on my branch and see how it goes. The other possibility is just stripping the legends along with the background, but can legends change by frame?

Unexpected output when using gganimate with geom extension, but not when using animation::saveGIF

I'm trying to use a frame aesthetic with a geom extension, ggforce::geom_voronoi_*, but getting a rather unexpected output.

voronoi_gganimate

However, my animation works as expected when creating ggplots individually in a for loop and calling animation::save* directly, which I understand gganimate uses for creating animations.

voronoi_animation

I guess this might be an issue with the geom extension more than anything — I had a similar issue using geom_convexhull but not when manually calculating convex hulls using chull and plotting using geom_polygon — but I'd appreciate it if you could point me in a direction I could take to modify the code in order to handle a frame aesthetic.

Thanks for a great package!


Reprex:

library(dplyr)
library(ggplot2)
library(ggforce)

# sample data
set.seed(123)
home <- lapply(1:11, function(i) {
  data.frame(x = runif(1, 0, 65) + cumsum(runif(10, -2, 2)),
             y = runif(1, 0, 68) + cumsum(runif(10, -2, 2)),
             frame = 1:10,
             id = i,
             team = 0)
}) %>%
  plyr::rbind.fill()

away <- lapply(1:11, function(i) {
  data.frame(x = runif(1, 50, 105) + cumsum(runif(10, -2, 2)),
             y = runif(1, 0, 68) + cumsum(runif(10, -2, 2)),
             frame = 1:10,
             id = i,
             team = 1)
}) %>%
  plyr::rbind.fill()

df <- rbind(home, away)
df$team <- as.factor(df$team)

# single frame: fine
# single frame: expected
ggplot(filter(df, frame == 1), aes(x, y)) +
  geom_point(aes(fill = team), shape = 21, col = "black", size = 5, alpha = 0.8) +
  geom_voronoi_tile(aes(fill = team), bound = c(0, 105, 0, 68), alpha = 0.25) +
  geom_voronoi_segment(bound = c(0, 105, 0, 68)) +
  guides(fill = FALSE)

# gganimate: unexpected
g <- ggplot(df, aes(x, y, frame = frame)) +
  geom_point(aes(fill = team), shape = 21, col = "black", size = 5, alpha = 0.8) +
  geom_voronoi_tile(aes(fill = team), bound = c(0, 105, 0, 68), alpha = 0.25) +
  geom_voronoi_segment(bound = c(0, 105, 0, 68)) +
  guides(fill = FALSE)

gganimate::gganimate(g, interval = 0.2, "voronoi_gganimate.gif")

# animation::saveGIF: unexpected
animation::saveGIF({
  for(i in 1:max(df$frame)) {
    g <- ggplot(filter(df, frame == i), aes(x, y)) +
      geom_point(aes(fill = team), shape = 21, col = "black", size = 5, alpha = 0.8) +
      geom_voronoi_tile(aes(fill = team), bound = c(0, 105, 0, 68), alpha = 0.25) +
      geom_voronoi_segment(bound = c(0, 105, 0, 68)) +
      guides(fill = FALSE)
    print(g)
  }
  }, ani.options = animation::ani.options(ani.width = 630, ani.height = 408, interval = 0.2), movie.name = "voronoi_animation.gif")

Can't find frame aesthetic with geom_density_2d

Example:

library(ggplot2)
library(gganimate)

p <- ggplot(mtcars, aes(mpg, wt, frame = cyl)) +
  stat_density_2d(h = c(10,10), col = "white")

gganimate(p)
#> Error in gganimate(p): No frame aesthetic found; cannot create animation

Additional labels for faceted plots and additional legend

When I create a single plot, it looks like the following:

single-plot

However, when I pass it to gganimate, additional labels and an additional legend appear (as well as a blank first plot):

final_test

Without my providing a complete, reproducible example, are there any simple things I should be checking that might be causing the additional labels and legend?

Here is the code used to generate the plots:

gg <- ggplot() +
    geom_map(data = states, map = states,
             aes(x = long, y = lat, map_id = region),
             color= "white" , size = 0.1) +
    geom_map(data = df, map = states,
             aes(fill = `Activity Level`, map_id = region, frame = WEEK),
             color="white", size = 0.1) +
    coord_map(proj = "bonne", param = 45) +
    scale_fill_gradient(low = "cadetblue2", high = "dodgerblue3") +
    theme_map() +
    theme(legend.position= "bottom") +
    facet_wrap( ~ SEASON, ncol = 1) +
    ggtitle("Flu Outbreaks for December - February")

Parallel execution for speed?

Creating all of the frames for an animation can take a while. Perhaps there could be an option to use parallel execution to generate the frame if option("mc.cores") is set?

plot.title colour gets ignored by gganimate

Setting the title colour with plot.title = element_text(colour = col) gets ignored by gganimate.

Example:

library(ggplot2)
library(gapminder)

p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
  geom_point() +
  scale_x_log10() +
  theme(plot.title = element_text(colour = "red")) + 
  labs(title = "Title")

gganimate(p)

Cannot specify multiple intervals

The animation library supports multiple intervals but I can't seem to get this to work with gganimate. If I supply a vector of values to the interval argument for gganimate(), it ignores them all. Ditto if I supply a vector of values to the interval argument of ani.options() prior to running gganimate().

Animating Histograms gives weird graphs

I tried to animate histograms but I get this weird result

library(gganimate)
library(dplyr)

dtf <- replicate(10, data.frame(x = sample(1:10, 10, TRUE)), simplify = FALSE) %>% 
  do.call(rbind, .) %>% 
  mutate(frame = rep(1:10, each = 10))
p <- ggplot(dtf, aes(x)) +
  geom_histogram(aes(y = ..density.., frame = as.factor(frame)), 
                 binwidth = 1, fill = "transparent", colour = "grey10")
gganimate(p)

test

I tried to look what is wrong but I couldn't get past what ggplot_gtable() is doing

gganimate error : convert: unable to open image 'Rplot1.png'....

Hello, When I run the following code:

gganimate(multiples_chart, "multiples.gif", ani.width = 750, ani.height = 500, interval = 0.2)

I get the following error:

Executing:
"convert -loop 0 -delay 20 Rplot1.png Rplot2.png Rplot3.png Rplot4.png Rplot5.png Rplot6.png Rplot7.png
Rplot8.png Rplot9.png "multiples.gif""
convert: unable to open image 'Rplot1.png': No such file or directory @ error/blob.c/OpenBlob/3093.
convert: unable to open file `Rplot1.png' @ error/png.c/ReadPNGImage/4125.

convert: unable to open image 'Rplot2.png': No such file or directory @ error/blob.c/OpenBlob/3093.
convert: unable to open file Rplot2.png' @ error/png.c/ReadPNGImage/4125. convert: unable to open image 'Rplot3.png': No such file or directory @ error/blob.c/OpenBlob/3093. convert: unable to open file Rplot3.png' @ error/png.c/ReadPNGImage/4125.
convert: unable to open image 'Rplot4.png': No such file or directory @ error/blob.c/OpenBlob/3093.
convert: unable to open file Rplot4.png' @ error/png.c/ReadPNGImage/4125. convert: unable to open image 'Rplot5.png': No such file or directory @ error/blob.c/OpenBlob/3093. convert: unable to open file Rplot5.png' @ error/png.c/ReadPNGImage/4125.
convert: unable to open image 'Rplot6.png': No such file or directory @ error/blob.c/OpenBlob/3093.
convert: unable to open file Rplot6.png' @ error/png.c/ReadPNGImage/4125. convert: unable to open image 'Rplot7.png': No such file or directory @ error/blob.c/OpenBlob/3093. convert: unable to open file Rplot7.png' @ error/png.c/ReadPNGImage/4125.
convert: unable to open image 'Rplot8.png': No such file or directory @ error/blob.c/OpenBlob/3093.
convert: unable to open file Rplot8.png' @ error/png.c/ReadPNGImage/4125. convert: unable to open image 'Rplot9.png': No such file or directory @ error/blob.c/OpenBlob/3093. convert: unable to open file Rplot9.png' @ error/png.c/ReadPNGImage/4125.
convert: no images defined `multiples.gif' @ error/convert.c/ConvertImageCommand/3254.
an error occurred in the conversion... see Notes in ?im.convert
Error in file(file, "rb") : cannot open the connection

Unable to install

Hello! I am currently trying to install the gganimate package but seem unable to.
I am running Win 10, Rx64 3.3.0 and Rstudio 0.99.896;
the following command:
devtools::install_github("dgrtwo/gganimate")
will throw this error:

Downloading GitHub repo dgrtwo/gganimate@master
from URL https://api.github.com/repos/dgrtwo/gganimate/zipball/master
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Problem with the SSL CA cert (path? access rights?)

So after a few hours of despair, I decided to try and install the package manually. I followed this link:
http://stackoverflow.com/questions/14806705/manually-downloading-and-installing-packages-in-r?lq=1

the following command:
install.packages(pkgs = "C:/Users/Superzucca/Desktop/gganimate-master.zip", repos = NULL)
results in:
Installing package into ‘C:/Users/Superzucca/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified)
but then when I call:
library("gganimate-master") #as suggsted by R itself!!
this error is thown:
Error in library("gganimate-master") : there is no package called ‘gganimate-master’

please, help. I don't have any problems installing other pkgs and honestly don't know what else to try.
Thank you in advance,
Superzucca

convert.exe is not found in the new version of ImageMagick

Getting the following error while executing gg_animate function...

I cannot find ImageMagick with convert = "convert"
but I can find it from the Registry Hive: C:\Program Files\ImageMagick-7.0.3-Q16
"C:\Program Files\ImageMagick-7.0.3-Q16\convert.exe" -loop 0 -delay 10
Rplot1.png Rplot2.png Rplot3.png Rplot4.png Rplot5.png Rplot6.png Rplot7.png
Rplot8.png Rplot9.png Rplot10.png Rplot11.png Rplot12.png Rplot13.png

Cannot animate boxplot

It seems there is no frame in the data built for boxplots. Here is a MWE:

# MWE of boxplot w/ gganimate
nsamp <- 10000
set.seed(1234)
fakedf <- data.frame(x=ceiling(rnorm(nsamp,sd=2)),
                     y=rnorm(nsamp),
                     f=ceiling(runif(nsamp,min=0,max=7)))

library(ggplot2)
library(gganimate)
# this works:
ph <- ggplot(fakedf,aes(x=x,y=y,frame=f)) + geom_point()
gg_animate(ph)

# this does not:
ph <- ggplot(fakedf,aes(x=x,y=y,group=x,frame=f)) + geom_boxplot()
gg_animate(ph)

Here is the response:

Error in gg_animate(ph) : 
  No frame aesthetic found; cannot create animation

Digging into the code, there is no frame:

blt <- ggplot_build(ph)
colnames(blt$data[[1]]) 
 [1] "ymin"       "lower"      "middle"     "upper"      "ymax"       "outliers"   "notchupper" "notchlower" "x"          "group"      "PANEL"      "ymin_final"
[13] "ymax_final" "xmin"       "xmax"       "weight"     "colour"     "fill"       "size"       "alpha"      "shape"      "linetype"  
'frame' %in% colnames(blt$data[[1]]) 
FALSE

finer control for title_frame

This is an excellent package; thanks for making it.

I'm making an animation where frame is numeric. Currently, the number of digits included in the title_frame varies depending on how many digits after the decimal point are nonzero. As the width of the title changes, the digits jump around and everything becomes difficult to read.

Ideally, I'd like to be able to do something like pass a function of frame to either gg_animate or to ggtitle, so that I could control the text that is generated.

If this is not currently possible (I didn't see the option in ?gg_animate), would it be feasible to alter gganimate to accommodate this use? Thanks in advance

Changing interval yields error

Any idea why I am getting the following error? Thanks!

From the code example in the README:

library(gapminder)
library(ggplot2)
theme_set(theme_bw())

p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
  geom_point() +
  scale_x_log10()

library(gganimate)

gganimate(p)  # works

The following then throws an error:

gganimate(p, interval = .2)
# Error in check.options(new, name.opt = ".X11.Options", envir = .X11env) : 
#  invalid argument name ‘interval’ in 'grDevices::png(..., res = dpi, units = "in")'

saving file to gif in windows leads to savepath error

example:

gg_animate(p, "output.gif")

gives me the following output:

Output at: D:\Docs\Documents\folder/output.gif
opening gganimate file stored at
Error in shell.exec(file) : invalid 'file' argument

It seems it adds a forwardslash automaticaly. which doesn't work in windows.
I'm not sure where the save function is in the scripts, but I advice replacing filepaths with the
file.path() function.

dependencies error

It reports dependencies error while I have all the packages it requires.

Downloading GitHub repo dgrtwo/gganimate@master
from URL https://api.github.com/repos/dgrtwo/gganimate/zipball/master
Installing gganimate
"C:/PROGRA1/R/R-331.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD INSTALL
"C:/Users/wahol/AppData/Local/Temp/Rtmpc5l8dZ/devtools34ac5b20655c/dgrtwo-gganimate-0e7b8ae"
--library="C:/Users/wahol/OneDrive/文档/R/win-library/3.3" --install-tests
ERROR: dependencies 'plyr', 'ggplot2', 'animation', 'base64enc', 'htmltools', 'withr' are not available for package 'gganimate'

  • removing 'C:/Users/wahol/OneDrive/文档/R/win-library/3.3/gganimate'
    Error: Command failed (1)

gg_animate_save in README

Thanks for a great and useful package!

In the README, the saving does not reflect the recent changes using an gg_animate object.

gg_animate(p)  %>% gg_animate_save("output.gif")

Frame Sticks across Animation

mostly detailed here, I've attached the base file for reproduction.
newnolarank4.txt

it seems one frame will get stuck as a shadow across all the animation.

I've got a data frame that looks like the below:

head(newnolarank)

lon      lat week b
1 -90.06445 29.97121    1 9
2 -90.06704 29.96944    1 9
3 -90.07495 29.96567    1 9
4 -90.07448 29.96621    1 9
5 -90.16480 29.91240    1 9
6 -90.04797 29.94557    1 9

my map was generated from the get_map function in ggmap

map <- get_map("New Orleans, LA", zoom=10, color="bw")

I used geom_hex to make a hex map

   p <- ggmap(map)+
    coord_cartesian()+
    stat_binhex(data=newnolarank,aes(x=lon, y=lat, alpha=0.5, frame = as.factor(b), cumulative = FALSE))+
    scale_fill_continuous(low="#ACD9F4",high="#EC008C")+
    theme(text=element_text(family="Avenir"), 
    axis.line=element_blank(), 
    axis.ticks = element_blank(), 
    axis.text = element_blank(), 
    plot.title=element_text(hjust=0.5),
     axis.title=element_blank())

Then used gganimate to make a gif. Here in is the problem; the resulting gif seems to have the old images even though cumulative was set to false, which creates an undesired effect of overlaying hexs, or hexes showing up in odd areas.

gganimate(p, "gif1.gif", title_frame = TRUE)

you can also see the overlay in the legends.

Thoughts on a CRAN / tagged release?

I'm a big fan of the package and have begun exploring it for my projects. I'd like to have this package installed in our R installation at work, but we typically install a release of a package either from CRAN or a tagged version fromthe GitHub repo. Have you thought about making at least a tagged release of the package?

Side note: It was great seeing you again at rstudio::conf and would like to have you on a future R Podcast episode soon! Let me know if you'd like to discuss further.

cannot gganimate my plot due to ImageMagick

Hello everyone

everytime that i try to gganimate my image i take this error

'"C:\Program Files\ImageMagick-7.0.5-Q16\convert.exe"' is not recognized as an internal or external command,
operable program or batch file

do you have any idea what should i do ?

Best,

Gapminder example results in immediate error

Running the gapminder example, I get the following error:

sh: convert: command not found
Error in cmd.fun(sprintf("%s --version", convert), intern = TRUE) :
error in running command
Error in file(file, "rb") : cannot open the connection

I'm running R version 3.3.2 (2016-10-31), on an apple computer (x86_64-apple-darwin13.4.0) running macOS Sierra (10.12.2)

thanks!

Request/Question

I'm trying to access some of the setting for exporting (codec, frame rates, bit rate, etc), do I do that through gganimate directly? Is there any comprehensive documentation? I tried using the 'animate' package's saveVideo function, but it didn't change any of the defaults from gganimate.

Love the package. Lots of uses for this.

gg_animate save in subdirectories

I'm not sure what the fix is for this, but I found that I can save via gg_animate to the current working directory, but not existing subdirectories.

gg_animate(p)
gg_animate(p, "test.gif")  # works!
gg_animate(p, "graphs/test.gif")  # doesn't work

I'm able to do this with ggsave, so hopefully one of us will be able to borrow from that sourcecode. Happy to try to figure out what to do! Not in my wheelhouse at all however so I defer to you =)

Ordered factor as frame aesthetic gives error

When using an ordered factor as a frame aesthetic I get an error. When I remove the ordered = T argument, it works without any errors.

Here's reproducible code.

months  <- factor( c("Jan", "Apr", "Jul", "Oct"),
     levels = c("Jan",  "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),
     ordered = TRUE)
df <- data.frame(x = 1:4, y = 1:4 , m = months)
plot <- ggplot(df, aes(x, y, frame = m))
gg_animate(plot)

output:

Error in frame_vec == f : comparison of these types is not implemented
In addition: Warning message:
Incompatible methods ("Ops.ordered", "Ops.factor") for "==" 

Here's my session info in case it's something on my end:

R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.1 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_2.1.0 gganimate_0.1

loaded via a namespace (and not attached):
 [1] labeling_0.3     colorspace_1.2-6 scales_0.4.0     plyr_1.8.4       rsconnect_0.4.3 
 [6] htmltools_0.3.5  tools_3.3.1      base64enc_0.1-3  withr_1.0.2      animation_2.4   
[11] gtable_0.2.0     Rcpp_0.12.5      grid_3.3.1       digest_0.6.9     munsell_0.4.3 

Cannot use the interval argument properly

library(gapminder)
library(ggplot2)
library(gganimate)
library(tweenr)
theme_set(theme_bw())
#had to use this because %>% isn't recognized for some reason
library(magrittr)

tw <- gapminder %>%
  split(.$year) %>%
  tweenr::tween_states(tweenlength = 5, statelength = 0,
                        ease = "linear",
                        nframes = 25)

p <- ggplot(tw, aes(gdpPercap, lifeExp, size = pop / 1e6, color = continent, frame = .frame)) +
  geom_point(alpha = 0.7) +
  scale_x_log10(breaks = c(400, 1000, 4000, 10000, 40000, 100000)) + 
  scale_size_continuous(range = c(1,13))

p

gganimate(p)
#this doesnt work
gganimate(p, interval = .2)

The error that I get is:

Error in grDevices::png(..., res = dpi, units = "in") : 
  unused argument (interval = 0.2)

R Language : Mixing gganimate and ggrepel

Hi,

I've been using both packages (gganimate and ggrepel) for a few days and I must say they are really helpful when it comes down to visualization. Though, I was wondering if there was a way of combining them.

Lastly, I've tried to plot, for a number of communities (in France), the amount of expenses in staff versus the amount of expenses in equipment for each community (18 of them) and the evolution of this arbitrage between 2011 and 2015.

So, an interesting thing to do would be to use ggrepel in order to relate a point to the right community as well as gganimate to see how these points evolve throughout time.

Here's a part of my code:

p <- ggplot(df) + 
          geom_point(aes(Equip, Staff, size=population, color=factor(Type), frame=Year)) + 
          scale_size(range = c(2,10)) +
          geom_label_repel(aes(Equip, Staff, fill = factor(Type),
                           label = Name),
                           size=2.5,
                           fontface = 'bold',
                           color = 'white',
                           box.padding = unit(2.5, "lines"),
                          point.padding = unit(0.1, "lines"),
                          segment.color = 'grey50',
                          segment.size = 1,
                          max.iter = 20000, alpha = .7) +
          facet_wrap(~other_variable, scales = "free")
gganimate(p,interval = 3,
          ani.width = 1064,
          ani.heigth = 768)

My problem is that gganimate updates only the points for each frame (i.e. year) and print all labels discarding which frame is actually being printed.

For instance, if in 2011 city A has coordinates: (100, 200) and in 2012 (150, 200), it will print the labels at each coordinate for both years instead of printing A at the first coordinates for 2011 and A at the second coordinates for 2012.

Does anyone have a solution to this issue?

Thanks a lot.

Laundry list of errors

Just tried every install from devtools and every recommendation posted here, but I keep getting a laundry list of errors.

Here's my source simulating a few correlated datasets, plotting them, and attempting to use gganimate to animate them:

library(ggplot2)
library(gganimate)

meanx1=0  #mean of the predicted distribution.
sdx1=1    #SD of the predicted distribution.
meany1=0  #mean of the actual distribution.
sdy1=1    #SD of the actual distribution.
n=100    #sample size for both distribution.

data = data.frame(matrix(ncol = 3, nrow = 0))
colnames(data) <- c("r","x1","y1")

for (i in -99:-89){ 
  r = i/100
  x1 = rnorm(n=n, mean=meanx1, sd=sdx1) #Simulated x 
  y0 = rnorm(n=n, mean=meany1, sd=sdy1)
  y1 = x1*r+y0*(1-r^2)^0.5
  df = data.frame(r,x1,y1)
  data = rbind(data,df)
}

p = ggplot(df) +
  aes(x = x1, y = y1, frame = r) +
  scale_x_continuous(limits = c(-3,3)) +
  scale_y_continuous(limits = c(-3,3)) +
  geom_point(alpha = 0.4) +
  theme_bw()

gganimate(p)

Here's the errors:

I cannot find ImageMagick with convert = "magick"
I also cannot find ImageMagick with convert = "convert"
but I can find it from the Registry Hive: C:\Program Files\ImageMagick-7.0.6-Q16
Executing:
"C:\Program Files\ImageMagick-7.0.6-Q16\convert.exe -loop 0 -delay 100 Rplot1.png
"filefc4daa22d8.gif""
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
an error occurred in the conversion... see Notes in ?im.convert
Error in file(file, "rb") : cannot open the connection
In addition: Warning messages:
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 magick --version' had status 1
3: running command 'C:\WINDOWS\system32\cmd.exe /c convert --version' had status 4
4: 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
5: running command 'C:\WINDOWS\system32\cmd.exe /c "C:\Program Files\ImageMagick-7.0.6-Q16\convert.exe -loop 0 -delay 100 Rplot1.png "filefc4daa22d8.gif""' had status 1
6: In cmd.fun(convert) :
'"C:\Program Files\ImageMagick-7.0.6-Q16\convert.exe -loop 0 -delay 100 Rplot1.png "filefc4daa22d8.gif""' execution failed with error code 1
7: running command '"C:\Program Files\ImageMagick-7.0.6-Q16\convert.exe -loop 0 -delay 100 Rplot1.png "filefc4daa22d8.gif""' had status 127
8: In file(file, "rb") :
cannot open file 'C:\Users\AJTHUR~1\AppData\Local\Temp\RtmpgvOP9S/gganimate\filefc4daa22d8.gif': No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.