thomasp85/ggraph

handling of n parameter seems inconsistent

schochastics opened this issue · 2 comments

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

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

Closing it here as this is an inconsistency inherited from ggforce