Home Wiki Blog Forum GEXF.net

Gephi forums

Community support

[SOLVED] Fixed Node Placement

Algorithms and parameters to put data in space

[SOLVED] Fixed Node Placement

Postby elijah » 24 Sep 2010 23: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?
elijah
Gephi Community Support
 
Posts: 169
Joined: 11 Sep 2010 19:09
Location: Stanford, CA

Re: Fixed Node Placement

Postby admin » 25 Sep 2010 00:42

Sure,

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

More info on this thread.
User avatar
admin
Gephi Community Manager
 
Posts: 959
Joined: 09 Dec 2009 15:41
Location: Paris, France

Re: Fixed Node Placement

Postby elijah » 25 Sep 2010 01:18

Perfect!
elijah
Gephi Community Support
 
Posts: 169
Joined: 11 Sep 2010 19:09
Location: Stanford, CA

Re: Fixed Node Placement

Postby mbastian » 26 Sep 2010 18: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.
User avatar
mbastian
Gephi Architect
 
Posts: 728
Joined: 10 Dec 2009 11:11
Location: San Francisco, CA

Re: Fixed Node Placement

Postby elijah » 29 Sep 2010 18: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 19:09
Location: Stanford, CA

Re: Fixed Node Placement

Postby elijah » 30 Sep 2010 20: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?
elijah
Gephi Community Support
 
Posts: 169
Joined: 11 Sep 2010 19:09
Location: Stanford, CA

Re: Fixed Node Placement

Postby mbastian » 02 Oct 2010 14: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
User avatar
mbastian
Gephi Architect
 
Posts: 728
Joined: 10 Dec 2009 11:11
Location: San Francisco, CA

Re: Fixed Node Placement

Postby elijah » 02 Oct 2010 22: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 19:09
Location: Stanford, CA

Re: Fixed Node Placement

Postby elijah » 02 Oct 2010 22: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.
elijah
Gephi Community Support
 
Posts: 169
Joined: 11 Sep 2010 19:09
Location: Stanford, CA


Return to Layouts

Who is online

Users browsing this forum: No registered users and 1 guest