Skip to content

Feature Request: full gif support #43

@carlos-pusch

Description

@carlos-pusch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions