[Top][All Lists]

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

Re: [igraph] igraph-help Digest, Vol 114, Issue 13

From: shailesh tripathi
Subject: Re: [igraph] igraph-help Digest, Vol 114, Issue 13
Date: Wed, 27 Jan 2016 17:29:46 +0200

I am using igraph's plot functions for the visualisation of networks. I am wondering that the many parameters in layout.fruchterman.reingold and layout.kamada.kawai functions have been deprecated  and therefore the visualisation of large graphs, specially scale free networks, are not looking as good as they were in past versions of igraph (sometime very ugly).
I just want to know that is there any solution to achieve similar visualisation using the newest version of igraph.  

Looking forward to the reply.

Shailesh Tripathi

On Tue, Jan 26, 2016 at 7:01 PM, <address@hidden> wrote:
Send igraph-help mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of igraph-help digest..."

Today's Topics:

   1. Layout of nodes in a 2D graph with fixed Y-positions and
      random non-overlapping X-positions (Charles Novaes de Santana)


Message: 1
Date: Tue, 26 Jan 2016 17:08:13 +0100
From: Charles Novaes de Santana <address@hidden>
To: Help for igraph users <address@hidden>
Subject: [igraph] Layout of nodes in a 2D graph with fixed Y-positions
        and random non-overlapping X-positions
Content-Type: text/plain; charset="utf-8"

Dear all,

Does any of you have an idea about how to automatically generate a layout
for a 2D graph considering that:

1 - the user gives the Y-position of the nodes
2 - the user don't care about the X-position of the nodes
3 - the nodes can have different sizes
4 - the nodes can not overlap
5 - the nodes should show their numeric labels, preferably inside them

I was planning to do this by myself, creating the X-positions according to
the number of nodes in each "level" of the graph and to the maximum size of
a node. And I decided to write to the list just to see if anyone have
implemented it before and could help me.

Please consider the code below as a starting point:


nnodes = 100;#number of nodes is 100
g<-erdos.renyi.game(nnodes,0.07);#random graph with nnodes nodes
ypos<-round(runif(nnodes,min=0,max=3))#positions between 0 and 10
mysizes<-runif(nnodes,min=8,max=16)#sizes between 3 and 10

plot(g, layout=mylayout, vertex.size=sizes, axes = FALSE, rescale=FALSE,
ylim=range(ypos), vertex.size=mysizes)
The resulting figure is here

Any suggestion about how to define the vector xpos in such a way that I can
avoid nodes to overlap? Any other suggestion to create the layout?

Thanks for any help!


Um ax?! :)

Charles Novaes de Santana, PhD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nongnu.org/archive/html/igraph-help/attachments/20160126/6f4dbcde/attachment.html>


igraph-help mailing list

End of igraph-help Digest, Vol 114, Issue 13

reply via email to

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