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

Still missing edges when using native end_cap and start_cap #282

Closed
jdfoote opened this issue Feb 15, 2021 · 1 comment
Closed

Still missing edges when using native end_cap and start_cap #282

jdfoote opened this issue Feb 15, 2021 · 1 comment

Comments

@jdfoote
Copy link

jdfoote commented Feb 15, 2021

It looks to me like #254 should be fixed, but I am updated to 2.0.4 and I'm still seeing the same behavior. Here's a MWE.

Is there something I'm missing?

set.seed(23)
G = as_tbl_graph(random.graph.game(8, .25, directed = T))
G %>%
  activate(nodes) %>%
  mutate(degree = centrality_degree(mode = 'in')) %>%
  ggraph() +
  geom_node_point(aes(size = degree), color = '#ceb888') +
  geom_edge_fan(aes(end_cap = circle(node2.degree,"native"),
                    start_cap = circle(node1.degree, "native")),
                arrow = arrow(length = unit(3, 'mm'))) 

image

@thomasp85
Copy link
Owner

The issue is that you are using "native" units which goes from 0 to 1 across the range of the viewport. This means that all the cap areas are much larger than the viewport

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

2 participants