4

Has anyone been able to export GraphML, readable by Gephi or yEd, which properly displays labels in Gephi/yEd?

I'm using the latest Neo4j community and APOC; I can export GraphML from APOC just fine, and import into Gephi/yEd, but there doesn't seem to be a way to load the attributes/key/data elements, so that useful labels can be displayed.

Charlotte Skardon
  • 6,220
  • 2
  • 31
  • 42
Phil
  • 61
  • 2

2 Answers2

0

Add this line to the top of the graphml-file, along with the other keys.

<key id="labels" for="node" attr.name="labels"/>

You can then copy the "labels" property to the Label column in Gephi.

0

For who is using Neo4j / APOC 4.x.x pay attention to add {readLabels: true} to your CALL or the nodes will appear just as grey dots.

MATCH (n) DETACH DELETE n;
CALL apoc.import.graphml("file:///mypgraph.graphml", {readLabels: true});
MATCH (n) RETURN n;

Reference:

Edoardo Vignati
  • 433
  • 5
  • 14