2012-02-06 55 views
2

想要做一个心智图如下所示:的Graphviz:改善心智图

eureca http://dl.dropbox.com/u/2345750/wscb0m5u5_01.png

我尝试这样做:

digraph Alf { 
size = "15"; 
node [ shape = record , style=filled, fillcolor="#efefef",fontname=Helvetica, fontsize=10.5, fontcolor="#2b2b2b", height=0.25, width=1, penwidth=0 ]; 
edge [arrowhead=normal,arrowsize=0.5,len=0.5, color="#bfbfbf"]; 

root [label ="Autors i teories de la comunicació no verbal"]; 
1 [ label="es concreta en", fontcolor="#00aeef", fontsize=9.5, fillcolor=white ]; 

root->1; 
1->"LOE" 
1->"Estratègies"; 
1->"Activitats"; 
1->"Recursos"; 

2 [label="programes d'aprenentatge", fontcolor="#00aeef", fontsize=9.5, fillcolor=white]; 

"LOE"->2 
"Estratègies"->2; 
"Activitats"->2; 
"Recursos"->2; 

3 [label="es pot fer gràcies a", fontcolor="#00aeef", fontsize=9.5, fillcolor=white]; 
2->"Comunicació no verbal"->3; 

3->"Recordatori de\nconductes innates"; 
3->"Intencionalitat"; 
3->"Observació"; 
3->"Imitació"; 
} 

什么是产生这一点。非常相似,但不一样的:-(你可以看到。

ioc http://dl.dropbox.com/u/2345750/graphviz.png

谁能告诉我最接近的可能的解决方案或改进代码?

回答

3

我相信你想有一个节点shapepoint如下:

digraph Alf { 
size = "15"; 
node [ shape = record , style=filled, fillcolor="#efefef",fontname=Helvetica, fontsize=10.5, fontcolor="#2b2b2b", height=0.25, width=1, penwidth=0 ]; 
edge [arrowhead=normal,arrowsize=0.5,len=0.5, color="#bfbfbf"]; 

root [label ="Autors i teories de la comunicació no verbal"]; 
1 [shape=point penwidth height=0 width=0] 


root->1 [ label=" es concreta en", fontcolor="#00aeef", fontsize=9.5, fillcolor=white arrowhead=none fontname=Helvetica]; 

1->"LOE" 
1->"Estratègies"; 
1->"Activitats"; 
1->"Recursos"; 

2 [shape=point penwidth height=0 width=0] 



"LOE"->2 [arrowhead=none]; 
"Estratègies"->2 [arrowhead=none]; 
"Activitats"->2 [arrowhead=none]; 
"Recursos"->2 [arrowhead=none]; 


3 [shape=point penwidth=0 height=0 width=0]; 

2->"Comunicació no verbal" [label=" programes d'aprenentatge", fontcolor="#00aeef", fontsize=9.5, fillcolor=white fontname=Helvetica]; 
"Comunicació no verbal" -> 3 [label=" es pot fer gràcies a" fontcolor="#00aeef" fontsize=9.5 fillcolor=white arrowhead=none fontname=Helvetica]; 

3->"Recordatori de\nconductes innates"; 
3->"Intencionalitat"; 
3->"Observació"; 
3->"Imitació"; 
} 

graphviz result

+0

真的很好!只有第二点,在标签“programes d'aprenentatge”之前,并不是最好的解决方案。有什么方法可以清除箭头并只留下点? – xbelanch 2012-02-06 23:33:17

+0

是的,你需要'箭头=无'的边缘。 René已经更新了他的答案,请看 – 2012-02-06 23:40:53

1

为了摆脱箭头,只需添加arrowhead=none无论是边缘还是因为我在这里做下面的默认边缘清晰度(edge[...]):

digraph Alf { 
size = "15"; 
node [ shape = record , style=filled, fillcolor="#efefef",fontname=Helvetica, fontsize=10.5, fontcolor="#2b2b2b", height=0.25, width=1, penwidth=0 ]; 
edge [arrowhead=normal,arrowsize=0.5,len=0.5, color="#bfbfbf"]; 

root [label ="Autors i teories de la comunicació no verbal"]; 
1 [shape=point penwidth height=0 width=0] 


root->1 [ label=" es concreta en", fontcolor="#00aeef", fontsize=9.5, fillcolor=white arrowhead=none fontname=Helvetica]; 

1->"LOE" 
1->"Estratègies"; 
1->"Activitats"; 
1->"Recursos"; 

2 [shape=point penwidth height=0 width=0] 


edge[arrowhead=none] 
"LOE"->2 
"Estratègies"->2; 
"Activitats"->2; 
"Recursos"->2; 
edge[arrowhead=normal] 

3 [shape=point penwidth=0 height=0 width=0]; 

2->"Comunicació no verbal" [label=" programes d'aprenentatge", fontcolor="#00aeef", fontsize=9.5, fillcolor=white fontname=Helvetica]; 
"Comunicació no verbal" -> 3 [label=" es pot fer gràcies a" fontcolor="#00aeef" fontsize=9.5 fillcolor=white arrowhead=none fontname=Helvetica]; 

3->"Recordatori de\nconductes innates"; 
3->"Intencionalitat"; 
3->"Observació"; 
3->"Imitació"; 
} 

enter image description here

+0

已更改的答案哦,不用担心。 – marapet 2012-02-06 23:45:29

1

另一种可能性:

digraph Alf { 
    size = "15"; 
    node [ shape = record, style=filled, fillcolor="#efefef", fontname=Helvetica, 
     fontsize=10.5, fontcolor="#2b2b2b", height=0.25, width=1, penwidth=0 ]; 
    edge [ arrowhead=normal, arrowsize=0.5, len=0.5, fontcolor="#00aeef", 
     fontname=Helvetica, fontsize=9.5 ]; 

    root [ label ="Autors i teories ..." ]; 
    1 [ style=invis, label="" ]; 
    root->1 [ headclip=false,arrowhead=none ] ; 

    { 
    rank=same ; 
    1 ; "1b" ; 
    } 
    "1b" [ shape=none,style=solid,label="es concreta en" ]; 
    1 -> "1b" [ style=invis ]; 

    1->"LOE" [ tailclip=false ]; 
    1->"Estrategies" [ tailclip=false ]; 
    1->"Activitats" [ tailclip=false ]; 
    1->"Recursos" [ tailclip=false ]; 

    2 [ style=invis, label="" ]; 
    "LOE"->2 [ headclip=false,arrowhead=none ] ; 
    "Estrategies"->2 [ headclip=false,arrowhead=none ]; 
    "Activitats"->2 [ headclip=false,arrowhead=none ]; 
    "Recursos"->2 [ headclip=false,arrowhead=none ]; 

    { 
    rank=same ; 
    2 ; "2b" ; 
    } 
    "2b" [ shape=none,style=solid,label="programes d'aprenentatge" ]; 
    2 -> "2b" [ style=invis ]; 

    2->"Comunicacio no verbal" [ tailclip=false ]; 

    3 [style=invis, label="" ]; 
    "Comunicacio no verbal" -> 3 [ headclip=false,arrowhead=none ]; 

    { 
    rank=same ; 
    3 ; "3b" ; 
    } 
    "3b" [ shape=none,style=solid,label="es pot fer gracies a" ]; 
    3 -> "3b" [ style=invis ]; 

    3->"Recordatori de\nconductes innates" [ tailclip=false ]; 
    3->"Intencionalitat" [ tailclip=false ]; 
    3->"Observacio" [ tailclip=false ]; 
    3->"Imitacio" [ tailclip=false ]; 
} 

Graphviz output

+0

干得好!另一个问题是箭头和节点之间的距离。原始图形留下一点空间(视觉上更舒适),并且边缘的长度也缩短。 – xbelanch 2012-02-07 07:20:08