Visualization of GraphML graph?

17,823

Solution 1

I use yEd and it works on Linux, Windows and OSX. Plus it can export to several formats such as PDF, PNG, SVG, BMP, etc

Unfortunately, no command line support AFAIK

Solution 2

I don't have a complete recipe, but I can share my thoughts on it.

Since the graph can be visualized in a lot of ways, you should be able to manage its appearance somehow. Simply drawing nodes and edges without any pre-processing is not a good option - this approach will give you a random bunch of edges and nodes, especially on large graphs.

Here's an example algorithm to get a clean and visually attractive representation of a graph:

  1. Run some force-directed algorithm on the graph.
  2. Calculate graph modularity and color each node by its modularity class.
  3. Change size of each node based on its degree.
  4. If graph is too big, filter out nodes you're not interested in (probably nodes with low degree).
  5. Change edges thickness based on their weights.
  6. Add labels to nodes and edges.

You can do stuff like that with Gephi (in manual mode). They also offer a Gephi Toolkit that should be able to automate such things (unfortunately, I myself didn't try it yet). So I'd try to wrote simple console Java program that uses this toolkit.

Here's an example of a graph visualized with the algorithm above:

graph

Share:
17,823
Jerome Serrano
Author by

Jerome Serrano

Updated on July 24, 2022

Comments

  • Jerome Serrano
    Jerome Serrano almost 2 years

    What are the best options to visualize a graph defined in GraphML on Mac OSX or Linux ? R + iGraph seems to be a valid solution according to gremlin-users group but I'm wondering if there is any easier solution, ideally a simple "graphml2png" command line application. Any idea ?

Related