====== Edició d'esquemes ======
===== graphviz =====
* [[https://es.wikipedia.org/wiki/DOT|DOT Language ]] Wikipedia
* [[http://mdaines.github.io/viz.js/| Viz.js]] Editor online
* [[http://www.graphviz.org/doc/info/index.html|Documentació sobre graphviz]] [[http://www.graphviz.org/Documentation.php|Documentació]] sintaxi per la creació de grafos, diagrames i arbres
* [[http://graphs.grevian.org/|Tutorials i exemples]]
* [[http://www.dokuwiki.org/plugin:graphviz| Documentació sobre el connector]]
digraph G {
rankdir=BT;
ranksep=0.1;
size="9,5"
node [shape=plaintext, fontcolor=blue]
edge [arrowhead=none, color=black]
F0 [ label = "Oració", ]
F1 [ label = " L'Enric", fontcolor=red ]
F2 [ label = " redactava", fontcolor=red ]
F3 [ label = " un informe.", fontcolor=red ]
F0 -> S -> F1
F0 -> V -> F2
F0 -> O -> F3
}
Un altre exemple modificant la direcció i el sentit de l'arbre.
Per modificar la direcció i el sentit es fa amb l'atribut rankdir (BT, TB, LR, RL on BT és de baix a dalt, TB de dalt a baix, LR d'esquerra a dreta, RL de dreta a esquerra)
digraph G {
rankdir=TB;
ranksep=0.1;
size="9,5"
node [shape=plaintext, fontcolor=blue]
edge [arrowhead=none, color=black]
F0 [ label = "Oració", ]
F1 [ label = " L'Enric", fontcolor=red ]
F2 [ label = " redactava", fontcolor=red ]
F3 [ label = " un informe.", fontcolor=red ]
F0 -> S -> F1
F0 -> V -> F2
F0 -> O -> F3
}
==== Mapa mental bàsic ====
digraph g {
"Joan" -> "Anna" [label="creu", fontcolor="gray"];
"Anna" -> "David" [label="pensa", fontcolor="gray"];
"Eva" -> "David" [label="diu", fontcolor="gray"];
"Joan" -> "Eva" [label="cerca", fontcolor="gray"];
}
==== Exemples ====
=== Exemple 1 ===
digraph ER {
rankdir=LR;
ranksep=0.3;
nodesep=0.5;
ratio=expand;
size="9,5"
node [shape=box]; course; institute; student;
node [shape=ellipse]; {node [label="name"] name0; name1; name2;}
code; grade; number;
node [shape=diamond,style=filled,color=lightgrey]; "C-I"; "S-C"; "S-I";
name0 -> course;
code -> course;
course -> "C-I" [ label="n", len=1.00 ];
course -> "S-C" [ label="n", len=1.00 ];
"C-I" -> institute [ label="1", len=1.00 ];
institute -> name1;
institute -> "S-I" [ label="1", len=1.00 ];
"S-I" -> student [ label="n", len=1.00 ];
student -> grade;
student -> name2;
student -> number;
student -> "S-C" [ label="m",len=1.00];
{ rank=same; "S-C" "C-I" "S-I"}
{ rank=same; institute student }
label = "\n Entity Relation Diagram";
fontsize=20;
}
=== Exemple 2 ===
digraph G {
rankdir=LR;
size="9,5"
node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
node [shape = circle];
LR_0 -> LR_2 [ label = "SS(B)" ];
LR_0 -> LR_1 [ label = "SS(S)" ];
LR_1 -> LR_3 [ label = "S($end)" ];
LR_2 -> LR_6 [ label = "SS(b)" ];
LR_2 -> LR_5 [ label = "SS(a)" ];
LR_2 -> LR_4 [ label = "S(A)" ];
LR_5 -> LR_7 [ label = "S(b)" ];
LR_5 -> LR_5 [ label = "S(a)" ];
LR_6 -> LR_6 [ label = "S(b)" ];
LR_6 -> LR_5 [ label = "S(a)" ];
LR_7 -> LR_8 [ label = "S(b)" ];
LR_7 -> LR_5 [ label = "S(a)" ];
LR_8 -> LR_6 [ label = "S(b)" ];
LR_8 -> LR_5 [ label = "S(a)" ];
}
=== Exemple 3 ===
digraph G {
size="9,5"
compound=true;
subgraph cluster0 {
a -> b;
a -> c;
b -> d;
c -> d;
}
subgraph cluster1 {
e -> g;
e -> f;
}
b -> f [lhead=cluster1];
d -> e;
c -> g [ltail=cluster0,
lhead=cluster1];
c -> e [ltail=cluster0];
d -> h;
label = "Esquema d'exemple"
}
=== Exemple 4 ===
digraph g {
size="9,5"
node [shape=plaintext]
A1 -> B1
A3 -> B3
A1 -> A2 [label=f]
A2 -> A3 [label=g]
B2 -> B3 [label="g'"]
B2 -> A2
{ rank=same; A1 A2 A3 }
{ rank=same; B1 B2 B3 }
}
=== Exemple 5 ===
digraph structs {
node [shape=record];
struct1 [label=" left| mid\ dle| right"];
struct2 [label=" one| two"];
struct3 [label="hello\nworld |{ b |{c| d|e}| f}| g | h"];
struct1:f1 -> struct2:f0;
struct1:f2 -> struct3:here;
}
=== Exemple 6 ===
digraph R {
rankdir=LR
node [style=rounded]
node1 [shape=box]
node2 [fillcolor=yellow, style="rounded,filled", shape=diamond]
node3 [shape=record, label="{ a | b | c }"]
node1 -> node2 -> node3
}
===== Sintactica =====
Connector per crear arbres sintàctics a partir de la sintaxi de claudators
==== Sintaxi ====
[Pare [fill 1] [fill 2] ... [fill n]]
==== Exemples ====
[O [S La Marta][V ha comprat][CD un joc d'escacs][CI a la seva filla][CC en aquella botiga]]
[O [S Ell][V juga][CPrep a cartes][CC totes les tardes][CC al bar de la cantonada]]
[O [S Els convidats][V han trobat][CP l'arròs][Pred salat.]]
[O [S Aquella senyora] [V és] [Atr la secretària del subdirector de Recursos Humans.]]