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

view_step_manual() inserts final frame at start of animation #498

Open
bbcuffer opened this issue May 20, 2024 · 0 comments
Open

view_step_manual() inserts final frame at start of animation #498

bbcuffer opened this issue May 20, 2024 · 0 comments

Comments

@bbcuffer
Copy link

I think the combination of wrap = FALSE and pause_first = TRUE creates an issue with the first frame of the animation.

Has also happened using view_zoom_manual()

The animation here is supposed to start with x-limits of 1-7 and then zoom in to the top section of the x-axis (x-limits of 4-7).

ggplot(iris, aes(Petal.Length, Petal.Width, colour = Species)) +
       geom_point() +
       view_step_manual(wrap = FALSE,
                        pause_first = TRUE, 
                        xmin = c(1, 4),
                        xmax = c(7, 7),
                        ymin = 0,
                        ymax = 2.5
                        )

I've attached the first frame of the animation: limits are 4-7.

gganim_plot0001

And md5sums below show first frame is identical to final, rather than the the subsequent frames.

r$> md5s <- frame_vars() |> dplyr::pull(frame_source) |> purrr::map_chr(tools::md5sum)

r$> head(md5s)
[1] "8641919fb31b0bc4fe0b76b47210ae61" "d696c68c1add19d8e185beaaed3eff32" "d696c68c1add19d8e185beaaed3eff32"
[4] "d696c68c1add19d8e185beaaed3eff32" "d696c68c1add19d8e185beaaed3eff32" "d696c68c1add19d8e185beaaed3eff32"

r$> tail(md5s)
[1] "8641919fb31b0bc4fe0b76b47210ae61" "8641919fb31b0bc4fe0b76b47210ae61" "8641919fb31b0bc4fe0b76b47210ae61"
[4] "8641919fb31b0bc4fe0b76b47210ae61" "8641919fb31b0bc4fe0b76b47210ae61" "8641919fb31b0bc4fe0b76b47210ae61"

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