Visualization of GraphML graph? [closed]

筅森魡賤 提交于 2019-12-03 13:27:36

问题


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 ?


回答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




回答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:



来源:https://stackoverflow.com/questions/21682918/visualization-of-graphml-graph

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!