igraph-help
[Top][All Lists]
Advanced

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

[igraph] Re: keep vertex positions stable when doing fr plots


From: Matteo Zandi
Subject: [igraph] Re: keep vertex positions stable when doing fr plots
Date: Thu, 18 Dec 2008 22:57:17 +0100

link to a video of the app

http://www.youtube.com/watch?v=-_4N0JzGClU

Thanks again,
Matteo

On Thu, Dec 18, 2008 at 10:27 PM, Matteo Zandi <address@hidden> wrote:
Hi all,

I'm developing a small pygtk frontend to analyze a graph. The gui is very simple and consists of a DrawingArea and a HScale, by changing the HScale the user can set a threshold for the edges weight of the graph, so that if hscale = 0.5, only edges with weight > 0.5 are shown. This is done by updating the graph plot at each change of the hscale.

Currently I'm using Fruchterman Reingold layout, but this causes vertexes to be shown randomly at each change of the hscale, this can be very annoying and distracting for the user. I'd like to "stabilize" the position of vertexes with the help of the seed parameter, but at the moment I had no luck.

Since the seed parameter needs a starting layout as a list of lists, I calculate it with the circle layout

self.g.vs['fr_seed_coords'] = g.layout_circle()

plot.add(self.g, layout="fr", margin=(20,20,20,20), vertex_size=[s * 20 + 7 for s in self.g.vs['size']], seed = self.g.vs['fr_seed_coords'])

but it doesn't work, what am I doing wrong?
Thanks
Matteo


reply via email to

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