REditorSupport / REditorSupport/vscode-R

Support gifs in plot viewer

Open
#1,581 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the plot viewer entry point that handles PNG and SVG output, using the reported ggplot2 and gganimate example to trace how the gifski-rendered file is detected and displayed. Done means a rendered GIF opens as an animation in the plot viewer rather than as binary content.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
data-visualization, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.