Tag: family tree

Grappa Graphviz点可视化问题和问题

我正在使用这个点代码进行测试: 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; } 我创建Graph的Java代码如下: 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); 输出是这样的: 链接 为什么Tree格式错误? 是否有可能让树从左到右显示?