[SOLVED] Fixed Node Placement

Algorithms and parameters to put data in space
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:
[SOLVED] Fixed Node Placement

Post by elijah » 24 Sep 2010 22:31

I'd like to lock nodes into certain positions, basically fixing the geographic locations into their xy coordinate while allowing the related nodes to move in relation to those. I have the lat-long data and could easily translate that into xy data for a particular resolution at a particular projection, is there then any way to have the nodes take a position based on an xy attribute or x attribute and y attribute and hold those positions?

For instance, let's say the England node has an x attribute of "115" and a y attribute of "80" while the Berlin node has an x attribute of "700" and a y attribute of "795". Is there a way to have them hold those positions throughout a layout? Building on that, I'd like to store multiple xy coordinate pairs, to represent varying projections or even non-Cartesian layouts, and then cycle between them to see how that would affect the resulting visualization. Any suggestions?

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Fixed Node Placement

Post by admin » 24 Sep 2010 23:42

Sure,

Just install the GeoLayout plug-in directly from the Plugin Center in Gephi.

More info on this thread.

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Fixed Node Placement

Post by elijah » 25 Sep 2010 00:18

Perfect!

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Fixed Node Placement

Post by mbastian » 26 Sep 2010 17:04

Yes GeoLayout should definitely help for that ;) Also note that there is a fixed attribute for nodes. When fixed, nodes are not moved during layout. You can select and right click on nodes on the graph to settle/free nodes.

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Fixed Node Placement

Post by elijah » 29 Sep 2010 17:53

It would be great to be able to fix their position based on an attribute of the node, for when you want to lay out a few thousand of your nodes based on a predesigned pattern (whether geographic or not) and let the others float around them.

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Fixed Node Placement

Post by elijah » 30 Sep 2010 19:05

I'm having some difficulty with geolayout given the data that I'd like to work with. I have a series of nodes that have coordinates and a series of nodes that do not have coordinates. I'd like the nodes with coordinates to be laid out geographically and the nodes without coordinates to cluster based on the strength and type of their connections.

The first problem I ran into is that if there are any null values in the imported x or y data fields, then Gephi treats them as String fields and GeoLayout doesn't even recognize them. Is it even possible to get non-coordinate-possessing data into GeoLayout?

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Fixed Node Placement

Post by mbastian » 02 Oct 2010 13:00

It would be great to be able to fix their position based on an attribute of the node, for when you want to lay out a few thousand of your nodes based on a predesigned pattern (whether geographic or not) and let the others float around them.
That is easy, filter the graph according to your attribute, select all nodes with the rectangle, right click and select "Settle". These nodes will remain fixed during layout. Then, remove the filter to go back to the complete graph.
The first problem I ran into is that if there are any null values in the imported x or y data fields, then Gephi treats them as String fields and GeoLayout doesn't even recognize them. Is it even possible to get non-coordinate-possessing data into GeoLayout?
Which file format do you use? It should work fine even with null values

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Fixed Node Placement

Post by elijah » 02 Oct 2010 21:34

The filter-group-settle makes sense. It would work very well if I could first place the nodes with GeoLayout, fix them and then run different layouts to see how the non-geocoded nodes settle. I'll see how it goes.

I found the problem with the import: I was importing an edge list from a MySQL connection where the lat field and long field are DECIMAL(7,4). When I changed the fields to DOUBLE(7,4) they show up correctly. I'll report back after playing with GeoLayout a little.

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Fixed Node Placement

Post by elijah » 02 Oct 2010 21:42

Everything works great. I project with GeoLayout and then fix the locations and then switch to various other layouts and things work fine. It is a bit annoying when a new layout resets node position as part of its feature, especially when it takes a long time to get things to sort out or when you've positioned things specifically. I've also noticed that I tend to run into the invisible boundaries a lot with these datasets, is there any way to adjust that?

Otherwise, this is great.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable