-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display in RStudio Viewer #1
Comments
👍 |
Oh excellent! I had been wondering how to present animations in RStudio but hadn't yet found The one thing stopping this implementation is that as per #3 there are some issues with saving plots to a non-local directory in animation. I'm working on fixing them. A controllable in-RStudio animation widget would be really great and I'd be extremely interested in it! I'll probably be changing the output of gg_animate to be something like a "gganimate" object, which contains the relevant list of image links and whose print method would display the above browsable. So if you had a prototype htmlwidget that took a list of image files it would be easy to add it. |
That makes sense. I will prototype a more generic widget that will display a sequence of images as an animation. This would make it usable beyond |
Here is an initial prototype http://jsfiddle.net/ramnathv/cabkohuk/. It is a fairly straightforward one to make into a widget. I have mainly tried to replicate features from If there are additional features you would like to see in an animation viewer, feel free to add them so I can incorporate them. |
Very nice, will it work with |
also, just noticed the keybinding. Love it. |
@ramnathv I remembered this project https://github.com/socib/Leaflet.TimeDimension and thought it might help regarding functionality, look, and code. |
…the simple examples in the README and elsewhere. * The gg_animate function now doesn't display or save files directly, but through the `gg_animate_save` function (which it does call if it is given a filename). It now returns a `gg_animate` object then holds on to the location and content of those saved files. * The `print` method of `gg_animate` objects now allows browsing of GIFs within RStudio, as described in issue #1. When knitr is in progress it still prints all figures in a sequence, leaving knitr to handle the animation. We'll leave #1 open while we work on other widgets allowing in-RStudio exploration * Fixed #3 by using withr to execute the saving function in the specified subdirectory. * Fixed #4 with a special case for factors, which should be combined using `unlist`, as opposed to other types of frame columns (such as Date vectors) that should be combined using `do.call(c` (see #2) * Added some basic tests that require ffmpeg and ImageMagick to complete.
@ramnathv I've integrated the That prototype is great! Two thoughts:
I'd definitely be interested in seeing this turned into a widget and I'd get it into gg_animate right away. |
@dgrtwo The print method works great! Thanks for your feedback on the animator widget. Your suggestions can be easily incorporated. I will put them on my list of stuff to implement. I will update the prototype and ping you. |
just curious about the status, is a shiny friendly version available now? |
Love this :) |
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.Animation with Controls
This is possible with
scianimator
, but I find it really clunky, and the jquery requirement makes it meaty. Ifgganimate
can return an array of image paths, it should not be hard to write ahtmlwidget
that would display it with controls. I can prototype something for you if this is of interest.The text was updated successfully, but these errors were encountered: