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

handling of n parameter seems inconsistent #325

Closed
schochastics opened this issue Sep 3, 2022 · 2 comments
Closed

handling of n parameter seems inconsistent #325

schochastics opened this issue Sep 3, 2022 · 2 comments

Comments

@schochastics
Copy link
Contributor

schochastics commented Sep 3, 2022

I couldnt find any pointers in the code for this but it seems that the n parameter works differently for the 2-version than for the standard version?

library(igraph)
library(ggraph)
g <- graph.full(3)
V(g)$type <- c("a", "b", "c")

ggraph(g, "stress") +
  geom_edge_link2(edge_width = 2, aes(color = node.type), n = 3)

ggraph(g, "stress") +
  geom_edge_link(edge_width = 2, aes(color = as.factor(stat(index))), n = 3)

It looks like there are 4 points for geom_edge_link2 and 3 points for geom_edge_link

Apologies if this is intended and I am missing something

@thomasp85
Copy link
Owner

hmm... yeah - it seemed I changed course midways about whether n meant number of segments or number of vertices... good catch

@thomasp85
Copy link
Owner

Closing it here as this is an inconsistency inherited from ggforce

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

No branches or pull requests

2 participants