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

gganimate fails with start_cap/end_cap in ggraph #349

Open
mjsmith037 opened this issue Sep 25, 2019 · 0 comments
Open

gganimate fails with start_cap/end_cap in ggraph #349

mjsmith037 opened this issue Sep 25, 2019 · 0 comments
Labels

Comments

@mjsmith037
Copy link

While gganimate behaves as expected for simple ggraphs, when adding edge effects, such as start_cap or end_cap, it fails:

library(tidyverse)
library(tidygraph)
library(ggraph)
library(gganimate)
library(lubridate)

net_data <- play_erdos_renyi(10, 0.5) %>%
  activate(edges) %>%
  mutate(onset=as_datetime(1:n()), terminus=onset + 1)

ggraph(net_data) + geom_node_point() + geom_edge_link() +
  transition_events(start=onset, end=terminus, enter_length=origin, exit_length=origin)
#> Using `stress` as default layout

ggraph(net_data) + geom_node_point() + geom_edge_link(start_cap=circle())
#> Using `stress` as default layout

ggraph(net_data) + geom_node_point() + geom_edge_link(start_cap=circle()) +
  transition_events(start=onset, end=terminus, enter_length=origin, exit_length=origin)
#> Using `stress` as default layout
#> Warning: Cannot get dimensions of plot table. Plot region might not be
#> fixed
#> Warning: x must be a geometry object
#> ...
#> Warning: x must be a geometry object
#> Error in png::readPNG(frames[1], native = TRUE): unable to open /tmp/RtmpYdHlwj/28ca6bf2041c/gganim_plot0001.png

Created on 2019-09-25 by the reprex package (v0.3.0)

@thomasp85 thomasp85 added the bug label Mar 18, 2021
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

2 participants