graphviz, dot, 示例21-30

21)

digraph G {
size ="4,4";
main [shape=box]; /* this is a comment */
main -> parse [weight=8];
parse -> execute;
main -> init [style=dotted];
main -> cleanup;
execute -> { make_string; printf}
init -> make_string;
 edge [color=red]; // so is this
 main -> printf [style=bold,label="100 times"];
 make_string [label="make a\nstring"];
 node [shape=box,style=filled,color=".7 .3 1.0"];
 execute -> compare;
 }

22)

 digraph G {
 a -> b -> c;
 b -> d;
 a [shape=polygon,sides=5,peripheries=3,color=lightblue,style=filled];
 c [shape=polygon,sides=4,skew=.4,label="hello world"]
 d [shape=invtriangle];
 e [shape=polygon,sides=4,distortion=.7];
 }

23)

digraph html {
abc [shape=none, margin=0, label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
<TR><TD ROWSPAN="3"><FONT COLOR="red">hello</FONT><BR/>world</TD>
<TD COLSPAN="3">b</TD>
<TD ROWSPAN="3" BGCOLOR="lightgrey">g</TD>
<TD ROWSPAN="3">h</TD>
</TR>
<TR><TD>c</TD>
 <TD PORT="here">d</TD>
 <TD>e</TD>
 </TR>
 <TR><TD COLSPAN="3">f</TD>
 </TR>
 </TABLE>>];
 }
 

24)

digraph asde91 {
ranksep=.75; size = "7.5,7.5";
{
node [shape=plaintext, fontsize=16];
/* the time-line graph */
past -> 1978 -> 1980 -> 1982 -> 1983 -> 1985 -> 1986 ->
1987 -> 1988 -> 1989 -> 1990 -> "future";
/* ancestor programs */
"Bourne sh"; "make"; "SCCS"; "yacc"; "cron"; "Reiser cpp";
"Cshell"; "emacs"; "build"; "vi"; "<curses>"; "RCS"; "C*";
}
{ rank = same;
"Software IS"; "Configuration Mgt"; "Architecture & Libraries";
"Process";
};
node [shape=box];
{ rank = same; "past"; "SCCS"; "make"; "Bourne sh"; "yacc"; "cron"; }
{ rank = same; 1978; "Reiser cpp"; "Cshell"; }
{ rank = same; 1980; "build"; "emacs"; "vi"; }
{ rank = same; 1982; "RCS"; "<curses>"; "IMX"; "SYNED"; }
{ rank = same; 1983; "ksh"; "IFS"; "TTU"; }
{ rank = same; 1985; "nmake"; "Peggy"; }
{ rank = same; 1986; "C*"; "ncpp"; "ksh-i"; "<curses-i>"; "PG2"; }
{ rank = same; 1987; "Ansi cpp"; "nmake 2.0"; "3D File System"; "fdelta";
"DAG"; "CSAS";}
{ rank = same; 1988; "CIA"; "SBCS"; "ksh-88"; "PEGASUS/PML"; "PAX";
"backtalk"; }
{ rank = same; 1989; "CIA++"; "APP"; "SHIP"; "DataShare"; "ryacc";
"Mosaic"; }
{ rank = same; 1990; "libft"; "CoShell"; "DIA"; "IFS-i"; "kyacc"; "sfio";
"yeast"; "ML-X"; "DOT"; }
{ rank = same; "future"; "Adv. Software Technology"; }
"PEGASUS/PML" -> "ML-X";
"SCCS" -> "nmake";
"SCCS" -> "3D File System";
"SCCS" -> "RCS";
"make" -> "nmake";
"make" -> "build";
.
.
.
}

这个出错了,

25)

digraph g {
node [shape = record,height=.1];
node0[label = "<f0> |<f1> G|<f2> "];
node1[label = "<f0> |<f1> E|<f2> "];
node2[label = "<f0> |<f1> B|<f2> "];
node3[label = "<f0> |<f1> F|<f2> "];
node4[label = "<f0> |<f1> R|<f2> "];
node5[label = "<f0> |<f1> H|<f2> "];
node6[label = "<f0> |<f1> Y|<f2> "];
 node7[label = "<f0> |<f1> A|<f2> "];
 node8[label = "<f0> |<f1> C|<f2> "];
 "node0":f2 -> "node4":f1;
 "node0":f0 -> "node1":f1;
 "node1":f0 -> "node2":f1;
 "node1":f2 -> "node3":f1;
 "node2":f2 -> "node8":f1;
 "node2":f0 -> "node7":f1;
 "node4":f2 -> "node6":f1;
 "node4":f0 -> "node5":f1;
 }

26)

 digraph structs {
 node [shape=record];
 struct1 [shape=record,label="<f0> left|<f1> middle|<f2> right"];
 struct2 [shape=record,label="<f0> one|<f1> two"];
 struct3 [shape=record,label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"];
 struct1:f1 -> struct2:f0;
 struct1:f2 -> struct3:here;
 }

27)

digraph G {
nodesep=.05;
rankdir=LR;
node [shape=record,width=.1,height=.1];

node0 [label = "<f0> |<f1> |<f2> |<f3> |<f4> |<f5> |<f6> | ",height=2.5];
node [width = 1.5];
node1 [label = "{<n> n14 | 719 |<p> }"];
node2 [label = "{<n> a1 | 805 |<p> }"];
 node3 [label = "{<n> i9 | 718 |<p> }"];
 node4 [label = "{<n> e5 | 989 |<p> }"];
 node5 [label = "{<n> t20 | 959 |<p> }"] ;
 node6 [label = "{<n> o15 | 794 |<p> }"] ;
 node7 [label = "{<n> s19 | 659 |<p> }"] ;

 node0:f0 -> node1:n;
 node0:f1 -> node2:n;
 node0:f2 -> node3:n;
 node0:f5 -> node4:n;
 node0:f6 -> node5:n;
 node2:p -> node6:n;
 node4:p -> node7:n;
 }
 

28)

digraph G {
subgraph cluster0 {
node [style=filled,color=white];
style=filled;
color=lightgrey;
a0 -> a1 -> a2 -> a3;
label = "process #1";
}
subgraph cluster1 {
node [style=filled];
b0 -> b1 -> b2 -> b3;
label = "process #2";
color=blue
}
start -> a0;
start -> b0;
a1 -> b3;
b2 -> a3;
a3 -> a0;
a3 -> end;
b3 -> end;
start [shape=Mdiamond];
end [shape=Msquare];
}

29)

 digraph G {
  size="8,6"; ratio=fill; node[fontsize=24];
 
  ciafan->computefan; fan->increment; computefan->fan; stringdup->fatal;
  main->exit; main->interp_err; main->ciafan; main->fatal; main->malloc;
  main->strcpy; main->getopt; main->init_index; main->strlen; fan->fatal;
  fan->ref; fan->interp_err; ciafan->def; fan->free; computefan->stdprintf;
  computefan->get_sym_fields; fan->exit; fan->malloc; increment->strcmp;
  computefan->malloc; fan->stdsprintf; fan->strlen; computefan->strcmp;
  computefan->realloc; computefan->strlen; debug->sfprintf; debug->strcat;
  stringdup->malloc; fatal->sfprintf; stringdup->strcpy; stringdup->strlen;
  fatal->exit;
 
  subgraph "cluster_error.h" { label="error.h"; interp_err; }
 
  subgraph "cluster_sfio.h" { label="sfio.h"; sfprintf; }
 
  subgraph "cluster_ciafan.c" { label="ciafan.c"; ciafan; computefan;
  increment; }
 
  subgraph "cluster_util.c" { label="util.c"; stringdup; fatal; debug; }
 
  subgraph "cluster_query.h" { label="query.h"; ref; def; }
 
  subgraph "cluster_field.h" { get_sym_fields; }
 
  subgraph "cluster_stdio.h" { label="stdio.h"; stdprintf; stdsprintf; }
 
  subgraph "cluster_<libc.a>" { getopt; }
 
  subgraph "cluster_stdlib.h" { label="stdlib.h"; exit; malloc; free; realloc; }
 
  subgraph "cluster_main.c" { main; }
 
  subgraph "cluster_index.h" { init_index; }
 
  subgraph "cluster_string.h" { label="string.h"; strcpy; strlen; strcmp; strcat; }
 }

30)

digraph G {
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;
}

AI生成的摘要还挺牛逼的。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值