User Tools

Site Tools


other:graphviz_howto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
graphviz_howto [2012/04/04 14:57] – created dodgerother:graphviz_howto [2022/02/11 11:36] (current) – external edit 127.0.0.1
Line 1: Line 1:
-<graphviz dot right 500x200>+====== [DOC] Graphviz cheatsheet ====== 
 + 
 +====== Node Shapes ====== 
 +  * box 
 +  * polygon 
 +  * ellipse 
 +  * oval 
 +  * circle 
 +  * point 
 +  * egg 
 +  * triangle 
 +  * plaintext 
 +  * diamond 
 +  * trapezium 
 +  * parallelogram 
 +  * house 
 +  * pentagon 
 +  * hexagon 
 +  * septagon 
 +  * octagon 
 +  * doublecircle 
 +  * doubleoctagon 
 +  * tripleoctagon 
 +  * invtriangle 
 +  * invtrapezium 
 +  * invhouse 
 +  * Mdiamond 
 +  * Msquare 
 +  * Mcircle 
 +  * rect 
 +  * rectangle 
 +  * square 
 +  * none 
 +  * note 
 +  * tab 
 +  * folder 
 +  * box3d 
 +  * component 
 + 
 +Aquí unos [[http://www.graphviz.org/doc/info/shapes.html|Samples]]. 
 + 
 +====== Colors ====== 
 + 
 +[[http://graphviz.org/doc/info/colors.html]] 
 + 
 + 
 +====== Examples ====== 
 + 
 +<code> 
 +<graphviz>
 digraph test { digraph test {
- node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8+this [shape=doublecircle]; 
- node [shape = circle]; +is [shape=box]; 
- LR_0 -> LR_2 label "SS(B)" ]; +[shape=invtriangle]; 
- LR_0 -> LR_1 label "SS(S)" ]; +test [shape=polygon,sides=6,color=red,style=filled]; 
- LR_1 -> LR_3 [ label "S($end)" ]; +{ rank same
- LR_2 -> LR_6 [ label "SS(b)" ]; +thiswhat; 
- LR_2 -> LR_5 [ label "SS(a)" ]+} 
- LR_2 -> LR_4 [ label = "S(A)" ]+this->is
- LR_5 -> LR_7 [ label = "S(b)" ]+is->a; 
- LR_5 -> LR_5 [ label = "S(a)" ]+a->test
- LR_6 -> LR_6 [ label = "S(b)" ]+test->what
- LR_6 -> LR_5 [ label = "S(a)" ]+what->do
- LR_7 -> LR_8 [ label = "S(b)" ]+do->you
- LR_7 -> LR_5 [ label = "S(a)" ]+you->"think?";
- LR_8 -> LR_6 [ label = "S(b)]; +
- LR_8 -> LR_5 [ label = "S(a)" ];+
 } }
 </graphviz> </graphviz>
  
-<graphviz caption='Hello SVG and PNG' alt='phylogenetic tree' format='png'>+</code> 
 + 
 +<graphviz
 +digraph test { 
 +this [shape=doublecircle]; 
 +is [shape=box]; 
 +a [shape=invtriangle]; 
 +test [shape=polygon,sides=6,color=red,style=filled]; 
 +{ rank = same; 
 +this; what; 
 +
 +this->is; 
 +is->a; 
 +a->test; 
 +test->what; 
 +what->do; 
 +do->you; 
 +you->"think?"; 
 +
 +</graphviz> 
 + 
 + 
 + 
 +<graphviz> 
 +digraph test { 
 +this [shape=doublecircle]; 
 +is [shape=box]; 
 +a [shape=invtriangle]; 
 +test [shape=polygon,sides=6,color=red,style=filled]; 
 +{ rank = same; 
 +this; what; 
 +
 +this->is; 
 +is->a; 
 +a->test; 
 +test->what; 
 +what->do; 
 +do->you; 
 +you->"think?"; 
 +
 +</graphviz> 
 + 
 +<graphviz>
 digraph G { digraph G {
-                node [shape=plaintext]+compound=true
-                Mollusca [URL="Mollusca"]; +subgraph cluster0 { 
-                Neomeniomorpha [URL="Neomeniomorpha"]+a -> b
-                X1 [shape=point,label=""]+a -> c
-                Caudofoveata [URL="Caudofoveata"]+b -> d
-                Testaria [URL="Testaria"]+c -> d
-                Polyplacophora [URL="Polyplacophora"]; +} 
-                Conchifera [URL="Conchifera"]; +subgraph cluster1 { 
-                Tryblidiida [URL="Tryblidiida"]+e -> g
-                Ganglioneura [URL="Ganglioneura"]+e -> f
-                Bivalvia [URL="Bivalvia"]; +
-                X2 [shape=point,label=""]+b -> f [lhead=cluster1]; 
-                X3 [shape=point,label=""]; +d -> e
-                Scaphopoda [URL="Scaphopoda"]; +c -> g [ltail=cluster0
-                Cephalopoda [URL="Cephalopoda"]; +lhead=cluster1]; 
-                Gastropoda [URL="Gastropoda"]; +c -> e [ltail=cluster0]; 
-                Mollusca->X1->Testaria->Conchifera->Ganglioneura->X2->Gastropoda +-> h;
-                Mollusca->Neomeniomorpha +
-                X1->Caudofoveata +
-                Testaria->Polyplacophora +
-                Conchifera->Tryblidiida +
-                Ganglioneura ->Bivalvia +
-                X2->X3->Cephalopoda +
-                X3->Scaphopoda+
 } }
 </graphviz> </graphviz>
 +
other/graphviz_howto.1333551430.txt.gz · Last modified: 2012/04/04 14:57 by dodger