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

transition_reveal() messes up geom_path() in version 1.0.8 #473

Closed
yutannihilation opened this issue Dec 17, 2022 · 3 comments
Closed

transition_reveal() messes up geom_path() in version 1.0.8 #473

yutannihilation opened this issue Dec 17, 2022 · 3 comments
Labels

Comments

@yutannihilation
Copy link

Sorry for filing an issue with not-so-minimal reprex. It seems some behavior around transition_reveal() changed unexpectedly on version 1.0.8. As this is about transition_reveal(), this might be the same problem as #468, but I'm filing a new one in case this is a different problem.

Expected (generated with gganimate version 1.0.7)

Actual

library(string2path)
library(ggplot2)
library(gganimate)

d <- string2path("", "Noto Sans JP")
d <- tibble::rowid_to_column(d)

ggplot(d) +
  geom_path(aes(x, y, group = path_id),
            linewidth = 2, colour = "purple2", lineend = "round") +
  theme_minimal() +
  coord_equal() +
  transition_reveal(rowid)
#> `geom_path()`: Each group consists of only one observation.
#> ℹ Do you need to adjust the group aesthetic?
#> `geom_path()`: Each group consists of only one observation.
#> ℹ Do you need to adjust the group aesthetic?

Created on 2022-12-17 with reprex v2.0.2

@yutannihilation
Copy link
Author

It seems transition_reveal() skips some data points for some reason?

library(string2path)
library(ggplot2)
library(gganimate)

d <- string2path("&", "Arial", tolerance = 1e-4)
d <- tibble::rowid_to_column(d)
d2 <- dplyr::select(d, !rowid)

red <- alpha("red", 0.2)

ggplot(mapping = aes(x, y)) +
  geom_path(data = d2, aes(group = path_id), colour = red) +
  geom_point(data = d2, colour = red) +
  geom_path(data = d, aes(group = path_id)) +
  geom_point(data = d) +
  theme_minimal() +
  coord_equal() +
  transition_reveal(rowid)
#> `geom_path()`: Each group consists of only one observation.
#> ℹ Do you need to adjust the group aesthetic?
#> `geom_path()`: Each group consists of only one observation.
#> ℹ Do you need to adjust the group aesthetic?

Created on 2022-12-17 with reprex v2.0.2

@mccarthy-m-g
Copy link

See also the reprex in #445 which was broken in v1.0.8

@ddeannd
Copy link

ddeannd commented Jan 1, 2023

Figured I would add to this for another test case. I wish I checked here before fumbling around for a few hours trying to figure out what was wrong. A simple line chart with geom_line() also suffers from this bug, but only on the final frame from what I can tell. Every line but one will revert to it's previous value, no matter how long the x axis is. Here is an example:

test

I made a post on stackoverflow regarding this, as well. https://stackoverflow.com/questions/74971922/gganimate-transition-reveal-with-geom-line-breaking-on-the-final-frame

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

No branches or pull requests

4 participants