문제

I am looking forward to write a script that will automatically take input from a file and declare the nodes and edges, and produce a graph that can be visualized in any visualization software.

I tried dot language and graphViz. This language uses grammar which clearly declare the nodes of the graph like this: node1;, node2; and does not allow any special character except _.

It works well in all the cases but when I want to declare a node named java.lang.object it shows grammatical error because of presence of . and I can't change its grammar.

Can anyone help me by suggestion some other language which can take input from text file and can draw a graph on any visualization software.

도움이 되었습니까?

해결책

That's actually quite easy to do in graphviz, simply put some quotes around the node names. Or you may define first your node using a simple identifier and a label attribute.

Both techniques demonstrated here:

digraph g {
  "java.lang.object" -> "my.class";
  "my.class" -> "special < chars >";
  n1 [label="more.strange<node>names"];
  "special < chars >" -> n1;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top