Sunday, 30 June 2019

Gephi: Define a node in gexf


<node> element is used to define a node in the graph. Each node must have an unique identifier, it is used to distinguish this node from other nodes.

Example
<node id="0" label="A" />

HelloWorld.gexf
<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2">

   <meta lastmodifieddate="2018-04-05">
      <creator>Hari Krishna</creator>
      <description>Simple graph with two nodes</description>
   <keywords>basic, example</keywords>
   </meta>
   
   <graph defaultedgetype="directed" mode="static">
      <!-- Define nodes here -->
      <nodes>
         <node id="0" label="A" />
         <node id="1" label="B" />
      </nodes>
   
   <!-- Define edges here -->
      <edges>
         <edge id="0" source="0" target="1" />
      </edges>
   
   </graph>
   
</gexf>



Previous                                                 Next                                                 Home

No comments:

Post a Comment