rigraph icon indicating copy to clipboard operation
rigraph copied to clipboard

edges between rectangular vertices may pass through vertex

Open gaborcsardi opened this issue 11 years ago • 1 comments

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()

rplot001

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

gaborcsardi avatar Jan 14 '15 21:01 gaborcsardi

Same as #501.

szhorvat avatar Apr 01 '22 13:04 szhorvat

Closing in favour of #501

ntamas avatar Oct 29 '22 17:10 ntamas