Skip to content
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

Feature Request: full gif support #43

Open
carlos-pusch opened this issue Sep 21, 2022 · 0 comments
Open

Feature Request: full gif support #43

carlos-pusch opened this issue Sep 21, 2022 · 0 comments

Comments

@carlos-pusch
Copy link

Hi @GuangchuangYu ,

at first great work. Thanks for this helpful library!

The geom_image function works perfect with svg files, but unfortunately there appears an "error" when a gif image is used.
Only the first image is displayed, even if the package gganimate is used to create gifs with a plot.
I understand that a gif file is based on multiple images, and the first image displayed might be sufficient, but I need the full animation.

Is there a way to add the support of a full gif animation?
If this is possible, I would be very happy about an implementation.

Greetings

# R 4.2.1, Windows 10

x_x <- data.frame("V1"=1:3, "V2"= (1:3)^2, "type"=c("a", "b", "b"))

x_y <- ggplot() +
  geom_point(data=x_x, aes(V1, V2)) +
  ggimage::geom_image(data=x_x, aes(V1, V2, image='Sample.gif'))

x_y

x_z <- x_y +
  gganimate::transition_states(
    type,
    transition_length = 2,
    state_length = 1
  )

x_z

# sample gif:

Sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant