rigraph
rigraph copied to clipboard
edges between rectangular vertices may pass through vertex
From @bergsmat on September 18, 2014 18:13
library(igraph)
m <- c(
-1.0,1.0,
-0.6,0.6,
-0.2,1.0,
-1.0,0.2,
-0.2,0.2,
-0.6,-0.2,
0.2,-0.2,
-0.2,-0.6,
0.6,-0.6,
0.2,-1.0,
1.0,-1.0
)
m <- matrix(m, nrow=11,byrow=TRUE)
g <- graph.empty()
g <- add.vertices(g, nv = 11, shape='rectangle',color=NA,size = 20)
g <- add.edges(g, c(1,2,3,2,2,4,2,5,5,6,5,7,7,8,7,9,9,10,9,11))
g <- set.graph.attribute(g,'layout',m)
png()
plot(g)
dev.off()

Note that several edges seem to originate at the edge of the vertex that is further from the destination vertex. Effect seems more common for larger vertices larger graphs (more vertices).
Copied from original issue: igraph/igraph#682
Same as #501.
Closing in favour of #501