2

I am trying to view a .graphml file in the graph yEd editor as suggested in this thread. However I have difficulty in viewing the values in the nodes.

When I open the .graphml file it appears as shown in Figure 1. Then I clicked Layout-> Tree-> Directed and without changing any of the properties clicked OK. Then it converts to a tree structure as shown in Figure 2 but doesn't show the node values.

Am I doing anything wrong?

enter image description here

SriniShine
  • 909
  • 4
  • 20
  • 41

1 Answers1

2

The way label text is represented in my .graphml file is different from how yEd encodes and expect label information. So yEd doesn't pick it up automatically. I need to set the properties manually in order to display the labels.

  1. Open the .graphml in yEd
  2. Change the layout from the menu bar Layout -> (type of layout)

one drawback is yEd can't automatically detect the layout of the graph. However my file does not contain any layout information at all, anyways. My graph is undirected but yEd interprets it as directed. That is because by default yEd is directed. So if it's undirected we need to select one edge press ctrl+A to select all the nodes, then go to properties view and change the "Source Arrow" and "Target Arrow" properties.

  1. Set up a custom property for nodes and/or edges by Edit (in menu bar) -> Manage Custom Properties

enter image description here

  1. Apply the custom property for nodes and/or edges by Edit (in menu bar) -> Properties Mapper

enter image description here

enter image description here

Final output looks like below. This article provides a detailed explanation on how to do the mapping manually.

enter image description here I would like to thank Mr.Thomas from yED who helped me figure this out.

Also Gephi is another free software that we can use to view .graphml files. Reading graphml is not a default feature in Gephi. During the installation we need to specify (tick the checkbox) indicating we want to read .graphml files. However I think Gephi is more straightforward than yEd.

SriniShine
  • 909
  • 4
  • 20
  • 41
  • 1
    _"Also Gephi is another free software that we can use to view .graphml files. Reading graphml is not a default feature in Gephi. During the installation we need to specify (tick the checkbox) indicating we want to read .graphml files."_. True but even after the installation you can open Gephi and from the _File>Open_ menu you can navigate where the `.graphml` file is stored and open it. – Yannis P. Nov 13 '17 at 11:52
  • 1
    @YannisP. sorry I did not know this. When I was installing Gephi .graphml was not ticked under the supported. So I assumed I had to select it before installing. I'll remove this part. Thank you for letting me know. – SriniShine Nov 15 '17 at 10:53
  • 1
    Nothing to be sorry about :) – Yannis P. Nov 15 '17 at 12:14