-
Notifications
You must be signed in to change notification settings - Fork 308
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_follow keeps x-axis fixed while in transition #88
Comments
It seems the density curve keeps the full range at all time so the view is doing the right thing. Try with a non-density example |
Histogram also doesn't seem to work: library(tidyverse)
library(gapminder)
library(gganimate)
gapminder %>%
filter(year == 2007) %>%
mutate(log_gdp = log(gdpPercap)) %>%
gather(gdpPercap, log_gdp, key = "gdp_scale", value = "value") %>%
ggplot() +
geom_histogram(aes(value)) +
transition_states(gdp_scale, transition_length = 3, state_length = 2) +
view_follow() However, this works (like you said): library(tidyverse)
library(gapminder)
library(gganimate)
gapminder %>%
filter(year == 2007) %>%
mutate(log_gdp = log(gdpPercap)) %>%
gather(gdpPercap, log_gdp, key = "gdp_scale", value = "value") %>%
ggplot(aes(value, lifeExp)) +
geom_point() +
transition_states(gdp_scale, transition_length = 2, state_length = 1) +
view_follow() |
I think the "problem" is that the different binning and density transformations keep data even if it is zero, so the view can't zoom in more... I'll keep it open as it would be nice to solve but it is not obvious how it should be done |
Closing - don't think this should be solved in gganimate |
Anyone know if this has been fixed, or an alternative found? |
Was writing an example for view_follow to show log transformation effects on data:
I get this:
The x-axis remains constant while y changes appropriately (even though fixed_x is FALSE by default). Am I doing this wrong? Any ideas on how I can fix this?
The text was updated successfully, but these errors were encountered: