igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] misplaced edges in fixed layout


From: Leroi, Armand M
Subject: [igraph] misplaced edges in fixed layout
Date: Thu, 16 Feb 2017 20:22:57 +0000

Hello,

I am using a fixed layout.  Under some circumstances, the behaviour of the edges appears to interact with vertex.size in an unfortunate way 

Below is an example.  Here, the default vertex size (15?) gives almost invisible vertices.  But the edges and arrow heads all line up nicely.  So, I increase the vertex.size = 300. Now they’re visible, however, some of the edges no longer run from vertex-to-vertex. They’re misplaced and pointing in the wrong direction.  This phenomenon seems to affect y-axis-stacked nodes most acutely.  Can anyone suggest a fix?  Below is a MWE.  Play around with vertex.size and you should see what I mean. 

With thanks

Armand






nodes <- c('a','b','c','d','e','f')
x <- c(1540, 1540, 1540,1580,1600,1650)
y <- c(52, 53, 55,56,54,58)
from <- c('a','a','a','a','e','d')
to <- c('b','c','d','e','f','f')
Nodelist <- data.frame(nodes, x ,y)
Edgelist <- data.frame(from, to)
a<- graph_from_data_frame(vertices = Nodelist, d= Edgelist, directed = TRUE)
plot(a, ylim=c(52,58), xlim=c(1530,1650), asp=0, rescale=FALSE, axes=TRUE, vertex.size=400)


Attachment: smallnodes.pdf
Description: smallnodes.pdf

Attachment: bignodes.pdf
Description: bignodes.pdf


reply via email to

[Prev in Thread] Current Thread [Next in Thread]