{"action":"opened","issue":{"url":"https://api.github.com/repos/thomasp85/gganimate/issues/14","repository_url":"https://api.github.com/repos/thomasp85/gganimate","labels_url":"https://api.github.com/repos/thomasp85/gganimate/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/thomasp85/gganimate/issues/14/comments","events_url":"https://api.github.com/repos/thomasp85/gganimate/issues/14/events","html_url":"https://github.com/thomasp85/gganimate/issues/14","id":320617342,"number":14,"title":"exit_remain()?","user":{"login":"DavisVaughan","id":19150088,"avatar_url":"https://avatars3.githubusercontent.com/u/19150088?v=4","gravatar_id":"","url":"https://api.github.com/users/DavisVaughan","html_url":"https://github.com/DavisVaughan","followers_url":"https://api.github.com/users/DavisVaughan/followers","following_url":"https://api.github.com/users/DavisVaughan/following{/other_user}","gists_url":"https://api.github.com/users/DavisVaughan/gists{/gist_id}","starred_url":"https://api.github.com/users/DavisVaughan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavisVaughan/subscriptions","organizations_url":"https://api.github.com/users/DavisVaughan/orgs","repos_url":"https://api.github.com/users/DavisVaughan/repos","events_url":"https://api.github.com/users/DavisVaughan/events{/privacy}","received_events_url":"https://api.github.com/users/DavisVaughan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-06T18:43:58Z","updated_at":"2018-05-06T18:43:58Z","closed_at":null,"author_association":"NONE","body":"Just an idea, but what about a way to not remove the previous transitions from the graph? Essentially I want to transition by month by leave the previous months on the graph. That way it looks like the chart is growing out over time. Then on the wrap around it clears everything. With daily time steps it could look pretty neat. \r\n\r\nI'm definitely ignorant of best practices here though so if I'm doing something wrong just let me know.\r\n\r\n``` r\r\n#devtools::install_github(\"thomasp85/gganimate\")\r\nlibrary(gganimate)\r\nlibrary(dplyr)\r\nlibrary(lubridate)\r\nlibrary(ggplot2)\r\ndata(FANG, package = \"tibbletime\")\r\n\r\nFANG\r\n#> # A tibble: 4,032 x 8\r\n#>    symbol date        open  high   low close    volume adjusted\r\n#>    <chr>  <date>     <dbl> <dbl> <dbl> <dbl>     <dbl>    <dbl>\r\n#>  1 FB     2013-01-02  27.4  28.2  27.4  28    69846400     28  \r\n#>  2 FB     2013-01-03  27.9  28.5  27.6  27.8  63140600     27.8\r\n#>  3 FB     2013-01-04  28.0  28.9  27.8  28.8  72715400     28.8\r\n#>  4 FB     2013-01-07  28.7  29.8  28.6  29.4  83781800     29.4\r\n#>  5 FB     2013-01-08  29.5  29.6  28.9  29.1  45871300     29.1\r\n#>  6 FB     2013-01-09  29.7  30.6  29.5  30.6 104787700     30.6\r\n#>  7 FB     2013-01-10  30.6  31.5  30.3  31.3  95316400     31.3\r\n#>  8 FB     2013-01-11  31.3  32.0  31.1  31.7  89598000     31.7\r\n#>  9 FB     2013-01-14  32.1  32.2  30.6  31.0  98892800     31.0\r\n#> 10 FB     2013-01-15  30.6  31.7  29.9  30.1 173242600     30.1\r\n#> # ... with 4,022 more rows\r\n\r\nanim <- FANG %>%\r\n  filter(date >= \"2016-01-01\") %>%\r\n  mutate(mon = month(date)) %>%\r\n  ggplot(aes(x = date, y = close, color = symbol, alpha = 1)) + # if i dont set alpha i get an error\r\n  geom_line() +\r\n  transition_states(mon, transition_length = 5, state_length = 1)\r\n\r\nanimate(anim, nframes = 100, fps = 20)\r\n```\r\n\r\n![](https://i.imgur.com/2pr4zFh.gif)\r\n\r\nCreated on 2018-05-06 by the [reprex package](http://reprex.tidyverse.org) (v0.2.0)."}}
{"actor":{"display_login":"DavisVaughan"}}