vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Support gifs in plot viewer

Open katrinabrock opened this issue 10 months ago • 0 comments

Is your feature request related to a problem? Please describe. I'm generating gifs of plots, not just PNG/SVG. I'd like to see them in the same way that still plots show up.

Additional context Example code:

library(ggplot2)
library(gganimate)
anim <- ggplot(data.frame(x=1:10, y=rnorm(10)), aes(x=x, y=y)) +
            geom_point() +
            transition_time(x)
animate(anim)

I'm using gifski renderer. When I run this code, I get what looks like viewer trying to view a binary file: image

I can see that the gif was successfully rendered into the R temporary directory and if I select it, the animation does show up correctly in VSCode.

image

I've tried using httpdg plot viewer and httpdg web page. httpdg supports gif, and many other formats in addition to png and svg, so not sure where the limitation is coming from.

katrinabrock avatar Dec 23 '24 12:12 katrinabrock