3
내가이 점 코드를 사용하고 있습니다 질문 :그라파 graphviz를 점 시각화 문제와 내 테스트에 대한
Graph graph = null;
graph = program.getGraph();
JScrollPane jsp = new JScrollPane();
jsp.getViewport().setBackingStoreEnabled(true);
GrappaPanel gp = new GrappaPanel(graph);
gp.addGrappaListener(new GrappaAdapter());
gp.setScaleToFit(false);
jsp.setViewportView(gp);
출력은 :
digraph G { edge [dir=none];
p1 [shape=circle,style=filled,label="",height="0.01",width="0.01"];
q1 [shape=circle,style=filled,label="",height="0.01",width="0.01"];
q2 [shape=circle,style=filled,label="",height="0.01",width="0.01"];
q3 [shape=circle,style=filled,label="",height="0.01",width="0.01"];
{rank=same; father->p1; mother->p1};
{rank=same; q1->q2->q3};
{rank=same; son1; daughter1; daughter2};
p1->q2;
q1->son1;
q2->daughter1;
q3->daughter2;
}
내 자바 코드 그래프를 만들 수는 다음과 이 : Link
왜 형식이 잘못 되었습니까? 왼쪽에서 오른쪽으로 트리를 표시 할 수 있습니까?