[FIXED] Don't understand node positions

All questions about the GEXF (see http://gexf.net before)
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
cmagnien
Posts:2
Joined:02 Aug 2010 15:31
[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
[FIXED] Don't understand node positions

Post by cmagnien » 02 Aug 2010 15:48

I'm trying to open a graph with my predefined layout, by using node positions in the gexf file.
I'm testing this with three nodes only, my graph is:

Code: Select all

<gexf xmlns:viz="http:///www.gexf.net/1.1draft/viz" version="1.1" xmlns="http://www.gexf.net/1.1draft">
<graph defaultedgetype="directed" idtype="string" type="static">
<nodes count="3">
<node id="1" label="1">
  <viz:position x="0.0" y="30.0" z="0.0"/>
</node>
<node id="2" label="2">
  <viz:position x="0.0" y="20.0" z="0.0"/>
</node>
<node id="3" label="3">
  <viz:position x="0.0" y="10.0" z="0.0"/>
</node>
</nodes>
</graph>
</gexf>
So the (x,y) positions of the nodes are (0,30), (0,20), (0,10), and therefore the three nodes should be aligned.
When I open this graph they are not.

Does the viz:position attribute not represent the position of the nodes, or is there some kind of auto-layout happening when a graph is opened?
I feel I'm missing something, but I can't find what.

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: Don't understand node positions

Post by admin » 03 Aug 2010 09:23

Hi,

Thanks for the feedback It seems to be a bug. Mathieu?

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: Don't understand node positions

Post by mbastian » 10 Aug 2010 14:07

Yes seems a bug when using 0.0 position. The zero is ignored and the default random value is used then. I reported a bug.

A workaround is to set '0.1' to X for instance. The Auto-scale option could also cause issues. It could be safer to disable it in the report panel before validating.

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